mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 08:45:11 +00:00
Fixed skin overlay crash on multiplayer.
This commit is contained in:
1 parent
4cae85e50b
commit
a47323575e
2 files changed
+2
-2
No files matched your search
@@ -284,7 +284,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
Minecraft.getMinecraft().thePlayer.swingItem();
|
||||
}
|
||||
else if(type == EnumPacketClient.PLAYER_UPDATE_SKIN_OVERLAYS) {
|
||||
EntityPlayer sendingPlayer = (EntityPlayer) Minecraft.getMinecraft().theWorld.getEntityByID(buffer.readInt());
|
||||
EntityPlayer sendingPlayer = Minecraft.getMinecraft().theWorld.getPlayerEntityByName(Server.readString(buffer));
|
||||
NBTTagCompound compound = Server.readNBT(buffer);
|
||||
NoppesUtil.updateSkinOverlayData(sendingPlayer, compound);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class DataSkinOverlays implements IOverlayHandler {
|
||||
if (parent instanceof PlayerData) {
|
||||
NBTTagCompound compound = this.writeToNBT(new NBTTagCompound());
|
||||
((PlayerData) parent).player.getEntityData().setTag("SkinOverlayData", compound.getTagList("SkinOverlayData",10));
|
||||
Server.sendToAll(EnumPacketClient.PLAYER_UPDATE_SKIN_OVERLAYS, ((PlayerData) parent).player.getEntityId(), compound);
|
||||
Server.sendToAll(EnumPacketClient.PLAYER_UPDATE_SKIN_OVERLAYS, ((PlayerData) parent).player.getCommandSenderName(), compound);
|
||||
} else if (parent instanceof EntityNPCInterface) {
|
||||
((EntityNPCInterface) parent).updateClient = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user