Compare commits

...
3 Commits
Author SHA1 Message Date
terrarier2111 3e912f5282 Undo commit 2020-08-09 14:37:19 +02:00
terrarier2111 360562e80e Fixed NPE 2020-08-09 12:49:18 +02:00
terrarier2111 8ffc8836d6 Fixed NPE 2020-08-09 12:46:23 +02:00
@@ -23,8 +23,6 @@ public final class WrappedPacketInEntityAction extends WrappedPacket {
break;
}
}
} else {
enumPlayerActionClass = NMSUtils.getNMSClass("EnumPlayerAction");
}
} catch (ClassNotFoundException e) {
e.printStackTrace();
@@ -55,7 +53,7 @@ public final class WrappedPacketInEntityAction extends WrappedPacket {
//1.7.10
if (version.isLowerThan(ServerVersion.v_1_8)) {
animationIndex = Reflection.getField(entityActionClass, int.class, 1).getInt(packet);
animationIndex = Reflection.getField(entityActionClass, int.class, 1).getInt(packet); // TODO: += if packetdataserializer.version < 16
} else {
final Object enumObj = Reflection.getField(entityActionClass, enumPlayerActionClass, 0).get(packet);
final String enumValue = enumObj.toString();