From 7c1747369b050c30a9f07b48ff7a5621c6f3afd7 Mon Sep 17 00:00:00 2001 From: radmanplays <95340057+radmanplays@users.noreply.github.com> Date: Thu, 19 Sep 2024 23:23:04 +0330 Subject: [PATCH] Update npcspawner.js --- examplemods/npcspawner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examplemods/npcspawner.js b/examplemods/npcspawner.js index 7256c5a..2b67b65 100644 --- a/examplemods/npcspawner.js +++ b/examplemods/npcspawner.js @@ -13,11 +13,11 @@ // Get the PlayerInteractionManager class const PlayerInteractionManagerClass = ModAPI.reflect.getClassById("net.minecraft.server.management.PlayerInteractionManager"); - const playerInteractionManager = PlayerInteractionManagerClass.constructors[1](world.getRef()); + const playerInteractionManager = PlayerInteractionManagerClass.constructors[0](world.getRef()); // Get the EntityPlayerMP class to spawn the fake player const EntityPlayerMPClass = ModAPI.reflect.getClassById("net.minecraft.entity.player.EntityPlayerMP"); - const fakePlayer = EntityPlayerMPClass.constructors[1]( + const fakePlayer = EntityPlayerMPClass.constructors[0]( world.getMinecraftServer(), world.getRef(), fakeProfile, playerInteractionManager );