mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-23 09:37:35 +01:00
Use NMS#look instead of teleporting to set pitch
This commit is contained in:
parent
7a52682b87
commit
68e9ca68b5
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user