Skip to content

Commit

Permalink
Use NMS#look instead of teleporting to set pitch
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jul 13, 2019
1 parent 7a52682 commit 68e9ca6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,8 @@ private void stopNavigating() {
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) {
Expand Down

0 comments on commit 68e9ca6

Please sign in to comment.