From 46325c0049405a85875041369b55d280681106d5 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 1 Apr 2022 15:56:12 +0200 Subject: [PATCH] Fix entity animation Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/record/REntity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/record/REntity.java b/FightSystem_Core/src/de/steamwar/fightsystem/record/REntity.java index fe05d36..2be8a48 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/record/REntity.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/record/REntity.java @@ -180,8 +180,8 @@ public class REntity { } private static final Class animationPacket = Reflection.getClass("{nms.network.protocol.game}.PacketPlayOutAnimation"); - private static final Reflection.FieldAccessor animationEntity = Reflection.getField(animationPacket, int.class, 0); - private static final Reflection.FieldAccessor animationAnimation = Reflection.getField(animationPacket, int.class, 1); + private static final Reflection.FieldAccessor animationEntity = Reflection.getField(animationPacket, int.class, Core.getVersion() > 15 ? 6 : 0); + private static final Reflection.FieldAccessor animationAnimation = Reflection.getField(animationPacket, int.class, Core.getVersion() > 15 ? 7 : 1); public void animation(byte animation) { Object packet = Reflection.newInstance(animationPacket); animationEntity.set(packet, entityId);