Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Luis C.M committed 2024-01-30 19:18:01 -06:00
commit 4a5c61ee1e
31 files changed
+216 -54

No files matched your search

@@ -375,5 +375,14 @@ public class PacketHandlerClient extends PacketHandlerServer{
else if(type == EnumPacketClient.STOP_SOUNDS) {
ScriptSoundController.Instance.stopAllSounds();
}
else if(type == EnumPacketClient.SYNC_WEAPON) {
Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(buffer.readInt());
if(!(entity instanceof EntityNPCInterface))
return;
EntityNPCInterface npc = (EntityNPCInterface) entity;
int weaponSlotIndex = buffer.readInt();
ItemStack stack = ItemStack.loadItemStackFromNBT(Server.readNBT(buffer));
npc.inventory.weapons.put(weaponSlotIndex,stack);
}
}
}