EntityPose.CROUCHING -> EntityPose.SNEAKING, fixes error in 1.14 and maintainability
This commit is contained in:
parent
5d52f91f25
commit
822ad1b7fd
@ -9,6 +9,6 @@ public enum EntityPose {
|
||||
SLEEPING,
|
||||
SWIMMING,
|
||||
SPIN_ATTACK,
|
||||
CROUCHING,
|
||||
SNEAKING,
|
||||
DYING
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ public class FlagWatcher {
|
||||
} else if (isSwimming()) {
|
||||
setEntityPose(EntityPose.SWIMMING);
|
||||
} else if (isSneaking()) {
|
||||
setEntityPose(EntityPose.CROUCHING);
|
||||
setEntityPose(EntityPose.SNEAKING);
|
||||
} else {
|
||||
setEntityPose(EntityPose.STANDING);
|
||||
}
|
||||
|
@ -1389,11 +1389,13 @@ public class ReflectionManager {
|
||||
}
|
||||
|
||||
public static Object getNmsEntityPose(EntityPose entityPose) {
|
||||
return Enum.valueOf(getNmsClass("EntityPose"), entityPose.name());
|
||||
return Enum.valueOf(getNmsClass("EntityPose"),
|
||||
entityPose == EntityPose.SNEAKING && NmsVersion.v1_15.isSupported() ? "CROUCHING" : entityPose.name());
|
||||
}
|
||||
|
||||
public static EntityPose getEntityPose(Object nmsEntityPose) {
|
||||
return EntityPose.valueOf(((Enum) nmsEntityPose).name());
|
||||
String name = ((Enum) nmsEntityPose).name();
|
||||
return EntityPose.valueOf(name.equals("CROUCHING") ? "SNEAKING" : name);
|
||||
}
|
||||
|
||||
public static WrappedWatchableObject createWatchable(MetaIndex index, Object obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user