diff --git a/src/main/java/noppes/npcs/controllers/data/AnimationData.java b/src/main/java/noppes/npcs/controllers/data/AnimationData.java index 0ddf23d92..08e8d29f9 100644 --- a/src/main/java/noppes/npcs/controllers/data/AnimationData.java +++ b/src/main/java/noppes/npcs/controllers/data/AnimationData.java @@ -110,6 +110,13 @@ public class AnimationData implements IAnimationData { EventHooks.onAnimationFrameEntered(this.animation, this.animation.currentFrame()); } + synchronized (CommonProxy.serverPlayingAnimations) { + if (this.isClientAnimating && this.animationEntity != null && + !this.animationEntity.worldObj.isRemote && this.animation != null) { + CommonProxy.serverPlayingAnimations.add(this.animation); + } + } + List entities = sendingEntity.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox( sendingEntity.posX - range, sendingEntity.posY - range, sendingEntity.posZ - range, sendingEntity.posX + range, sendingEntity.posY + range, sendingEntity.posZ + range)); @@ -187,12 +194,6 @@ public class AnimationData implements IAnimationData { NBTTagCompound data = animationData.viewWriteNBT(new NBTTagCompound()); animationData.allowAnimation = prevEnabled; - synchronized (CommonProxy.serverPlayingAnimations) { - if (animationData.animationEntity != null && !animationData.animationEntity.worldObj.isRemote && animation != null) { - CommonProxy.serverPlayingAnimations.add(animation); - } - } - if (animation != null && currentFrame >= 0 && currentFrame < animation.frames.size()) { data.setInteger("Frame", currentFrame); data.setInteger("Time", time);