diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/EntityPose.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/EntityPose.java index 8e83c743..0f5b6afc 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/EntityPose.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/EntityPose.java @@ -9,6 +9,6 @@ public enum EntityPose { SLEEPING, SWIMMING, SPIN_ATTACK, - CROUCHING, + SNEAKING, DYING } diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java index 93c71bc6..4ee77006 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java @@ -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); } diff --git a/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java b/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java index 9a5f7f74..5796389e 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java @@ -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) {