From 7de789d9a4d2a1725f7ad609a0d23d6ffbf801ca Mon Sep 17 00:00:00 2001 From: fullwall Date: Mon, 20 Sep 2021 21:11:45 +0800 Subject: [PATCH] Adjust for compiler error --- .../java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java index 5ad25f0e7..ff6b5f6cb 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java @@ -1219,8 +1219,7 @@ public class NMSImpl implements NMSBridge { @Override public void setSitting(Ocelot ocelot, boolean sitting) { - EntityPose pose = sitting ? EntityPose.CROUCHING : EntityPose.STANDING; - getHandle(ocelot).setPose(pose); + setSneaking(ocelot, sitting); } @Override @@ -1233,7 +1232,8 @@ public class NMSImpl implements NMSBridge { if (entity instanceof Player) { ((Player) entity).setSneaking(sneaking); } - getHandle(entity).setPose(sneaking ? EntityPose.CROUCHING : EntityPose.STANDING); + EntityPose pose = sneaking ? EntityPose.CROUCHING : EntityPose.STANDING; + getHandle(entity).setPose(pose); } @Override