From 68e9ca68b53daf08aeb5eb8d10de3982d714cda0 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 14 Jul 2019 00:24:14 +0800 Subject: [PATCH] Use NMS#look instead of teleporting to set pitch --- .../main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java b/main/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java index 8367dd378..c2788cc1d 100644 --- a/main/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java +++ b/main/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java @@ -283,9 +283,8 @@ public class CitizensNavigator implements Navigator, Runnable { velocity.setX(0).setY(0).setZ(0); npc.getEntity().setVelocity(velocity); } - Location pitch = npc.getEntity().getLocation(); - pitch.setPitch(0); - npc.getEntity().teleport(pitch); + Location loc = npc.getEntity().getLocation(STATIONARY_LOCATION); + NMS.look(npc.getEntity(), loc.getYaw(), 0); } private void stopNavigating(CancelReason reason) {