mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-24 14:41:18 -09:00
Update npcspawner.js
This commit is contained in:
parent
cba7da5495
commit
149a848028
@ -7,13 +7,11 @@
|
|||||||
const world = event.sender.getServerForPlayer();
|
const world = event.sender.getServerForPlayer();
|
||||||
const playerPos = event.sender.getPosition();
|
const playerPos = event.sender.getPosition();
|
||||||
|
|
||||||
// Create a fake "null" UUID as a string
|
|
||||||
const nullUUID = "00000000-0000-0000-0000-000000000000";
|
|
||||||
|
|
||||||
// Create a fake player entity with a string-based UUID
|
// Create a fake player entity with a string-based UUID
|
||||||
const GameProfileClass = ModAPI.reflect.getClassById("com.mojang.authlib.GameProfile");
|
const GameProfileClass = ModAPI.reflect.getClassById("com.mojang.authlib.GameProfile");
|
||||||
const fakeProfile = GameProfileClass.constructors[2](
|
const fakeProfile = GameProfileClass.constructors[2](
|
||||||
nullUUID, ModAPI.util.str("Steve")
|
ModAPI.util.unstr(event.sender.getGameProfile().id2.toString()), ModAPI.util.str("Steve")
|
||||||
);
|
);
|
||||||
|
|
||||||
const EntityPlayerMPClass = ModAPI.reflect.getClassById("net.minecraft.entity.player.EntityPlayerMP");
|
const EntityPlayerMPClass = ModAPI.reflect.getClassById("net.minecraft.entity.player.EntityPlayerMP");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user