mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 00:17:27 +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
@@ -308,11 +308,15 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
AnimationData data;
|
||||
if (!Client.playerAnimations.containsKey(player.getUniqueID())) {
|
||||
data = new AnimationData(player);
|
||||
data.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
data.readFromNBT(compound);
|
||||
} else {
|
||||
data = Client.playerAnimations.get(player.getUniqueID());
|
||||
data.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
data.readFromNBT(compound);
|
||||
}
|
||||
if (data.animation == null) {
|
||||
data.animation = new Animation();
|
||||
}
|
||||
data.animation.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
Client.playerAnimations.put(player.getUniqueID(), data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user