mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +00:00
Fixed animation interpolation not working after animations are stopped.
This commit is contained in:
1 parent
f84b16b29a
commit
fd7412148d
2 files changed
+13
-15
No files matched your search
@@ -318,21 +318,19 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
}
|
||||
|
||||
if (animationData != null) {
|
||||
animationData.readFromNBT(compound);
|
||||
int animationId;
|
||||
if (compound.hasKey("AnimationID")) {
|
||||
animationId = compound.getInteger("AnimationID");
|
||||
} else {
|
||||
Animation animation = new Animation();
|
||||
animation.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
ClientCacheHandler.animationCache.put(animation.getID(), animation);
|
||||
animationId = animation.getID();
|
||||
}
|
||||
int animationId;
|
||||
if (compound.hasKey("AnimationID")) {
|
||||
animationId = compound.getInteger("AnimationID");
|
||||
} else {
|
||||
Animation animation = new Animation();
|
||||
animation.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
ClientCacheHandler.animationCache.put(animation.getID(), animation);
|
||||
animationId = animation.getID();
|
||||
}
|
||||
|
||||
if (animationData.allowAnimation) {
|
||||
animationData.setAnimation(ClientCacheHandler.animationCache.get(animationId));
|
||||
Client.sendData(EnumPacketServer.CacheAnimation, animationId);
|
||||
}
|
||||
animationData.setAnimation(ClientCacheHandler.animationCache.get(animationId));
|
||||
animationData.readFromNBT(compound);
|
||||
Client.sendData(EnumPacketServer.CacheAnimation, animationId);
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketClient.DISABLE_MOUSE_INPUT) {
|
||||
|
||||
Reference in new issue
Block a user