SteamWar/FightSystem
Archiviert
13
1

Fix entity animation
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-04-01 15:56:12 +02:00
Ursprung bb73d9ad78
Commit 46325c0049

Datei anzeigen

@ -180,8 +180,8 @@ public class REntity {
} }
private static final Class<?> animationPacket = Reflection.getClass("{nms.network.protocol.game}.PacketPlayOutAnimation"); private static final Class<?> animationPacket = Reflection.getClass("{nms.network.protocol.game}.PacketPlayOutAnimation");
private static final Reflection.FieldAccessor<Integer> animationEntity = Reflection.getField(animationPacket, int.class, 0); private static final Reflection.FieldAccessor<Integer> animationEntity = Reflection.getField(animationPacket, int.class, Core.getVersion() > 15 ? 6 : 0);
private static final Reflection.FieldAccessor<Integer> animationAnimation = Reflection.getField(animationPacket, int.class, 1); private static final Reflection.FieldAccessor<Integer> animationAnimation = Reflection.getField(animationPacket, int.class, Core.getVersion() > 15 ? 7 : 1);
public void animation(byte animation) { public void animation(byte animation) {
Object packet = Reflection.newInstance(animationPacket); Object packet = Reflection.newInstance(animationPacket);
animationEntity.set(packet, entityId); animationEntity.set(packet, entityId);