From 94fed81eeadf3521eb29d8f3ce0edd8176a6997e Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 20 Aug 2023 15:38:56 +0200 Subject: [PATCH] Fix 1.20 REntity --- SpigotCore_Main/src/de/steamwar/entity/REntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/entity/REntity.java b/SpigotCore_Main/src/de/steamwar/entity/REntity.java index 2acc9b4..f11e526 100644 --- a/SpigotCore_Main/src/de/steamwar/entity/REntity.java +++ b/SpigotCore_Main/src/de/steamwar/entity/REntity.java @@ -140,7 +140,7 @@ 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, Core.getVersion() > 15 ? 6 : 0); - private static final Reflection.FieldAccessor animationAnimation = Reflection.getField(animationPacket, int.class, Core.getVersion() > 15 ? 7 : 1); + private static final Reflection.FieldAccessor animationAnimation = Reflection.getField(animationPacket, int.class, Core.getVersion() > 15 ? (Core.getVersion() > 19 ? 6 : 7) : 1); public void showAnimation(byte animation) { Object packet = Reflection.newInstance(animationPacket); animationEntity.set(packet, entityId);