Update npcspawner.js

This commit is contained in:
radmanplays 2024-09-14 15:16:56 +03:30 committed by GitHub
parent 149a848028
commit 25a451c839
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@
// 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](
ModAPI.util.unstr(event.sender.getGameProfile().id2.toString()), ModAPI.util.str("Steve") 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");