mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 23:07:37 +00:00
Fixed animation times not resetting, causing some animations to get stuck if still enabled when in the middle of a frame that lasts a very long time.
This commit is contained in:
1 parent
17c6fe9728
commit
46ea214b64
1 file changed
+2
-6
@@ -297,9 +297,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
if (entity instanceof EntityNPCInterface) {
|
||||
AnimationData data = ((EntityNPCInterface) entity).display.animationData;
|
||||
data.readFromNBT(compound);
|
||||
if (data.animation == null) {
|
||||
data.animation = new Animation();
|
||||
}
|
||||
data.animation = new Animation();
|
||||
data.animation.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
}
|
||||
} else {
|
||||
@@ -313,9 +311,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
data = Client.playerAnimations.get(player.getUniqueID());
|
||||
data.readFromNBT(compound);
|
||||
}
|
||||
if (data.animation == null) {
|
||||
data.animation = new Animation();
|
||||
}
|
||||
data.animation = new Animation();
|
||||
data.animation.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
Client.playerAnimations.put(player.getUniqueID(), data);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user