mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user