Reapply "Revert Animation Events"

This reverts commit 4113bcc6e9.
This commit is contained in:
Kam committed 2024-08-22 16:47:45 -04:00
1 parent 22169c81a0
commit 934cc3d7cd
31 files changed
+206 -694

No files matched your search

@@ -479,24 +479,12 @@ public class ServerEventsHandler {
@SubscribeEvent
public void playerTracking(PlayerEvent.StartTracking event){
if (event.target.worldObj.isRemote) return;
if(!(event.target instanceof EntityNPCInterface) || event.target.worldObj.isRemote)
return;
if(event.target instanceof EntityPlayerMP || event.target instanceof EntityNPCInterface) {
AnimationData animationData = AnimationData.getData(event.target);
if (animationData.isClientAnimating()) {
AnimationData playerAnimData = AnimationData.getData(event.entityPlayer);
Animation currentAnimation = animationData.currentClientAnimation;
NBTTagCompound compound = currentAnimation.writeToNBT();
playerAnimData.viewAnimation(currentAnimation, animationData, compound,
animationData.isClientAnimating(), currentAnimation.currentFrame, currentAnimation.currentFrameTime);
}
if (event.target instanceof EntityNPCInterface) {
MarkData data = MarkData.get((EntityNPCInterface) event.target);
if (data.marks.isEmpty())
return;
Server.sendData((EntityPlayerMP) event.entityPlayer, EnumPacketClient.MARK_DATA, event.target.getEntityId(), data.getNBT());
}
}
MarkData data = MarkData.get((EntityNPCInterface) event.target);
if(data.marks.isEmpty())
return;
Server.sendData((EntityPlayerMP)event.entityPlayer, EnumPacketClient.MARK_DATA, event.target.getEntityId(), data.getNBT());
}
}