mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 23:55:10 +00:00
Improved animation NBT reading/writing.
This commit is contained in:
1 parent
be18e756fc
commit
9797a52af1
2 files changed
+9
-8
No files matched your search
@@ -23,15 +23,12 @@ public class AnimationData implements IAnimationData {
|
||||
}
|
||||
|
||||
public void updateClient() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound = this.writeToNBT(compound);
|
||||
compound.setTag("Animation",this.animation.writeToNBT());
|
||||
if (parent instanceof PlayerData) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
this.writeToNBT(compound);
|
||||
compound.setTag("Animation",this.animation.writeToNBT());
|
||||
Server.sendToAll(EnumPacketClient.UPDATE_ANIMATIONS, compound, ((PlayerData) parent).player.getCommandSenderName());
|
||||
} else if (parent instanceof DataDisplay) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
this.writeToNBT(compound);
|
||||
compound.setTag("Animation",this.animation.writeToNBT());
|
||||
compound.setInteger("EntityId",((DataDisplay) parent).npc.getEntityId());
|
||||
Server.sendAssociatedData(((DataDisplay) parent).npc, EnumPacketClient.UPDATE_ANIMATIONS, compound);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user