Don't update controller look during navigation

This commit is contained in:
fullwall 2016-12-24 21:22:11 +08:00
parent 7cf12cdf78
commit f7a4e78a8c
3 changed files with 5 additions and 1 deletions

View File

@ -162,7 +162,7 @@ public class CitizensNavigator implements Navigator, Runnable {
updatePathfindingRange();
boolean finished = executing.update();
if (localParams.lookAtFunction() != null) {
Util.faceLocation(npc.getEntity(), localParams.lookAtFunction().apply(this), true);
Util.faceLocation(npc.getEntity(), localParams.lookAtFunction().apply(this), true, false);
Entity entity = npc.getEntity().getPassenger();
Location npcLoc = npc.getEntity().getLocation();
while (entity != null) {

View File

@ -19,6 +19,8 @@ public class PlayerControllerLook {
}
public void a() {
if (!NMSImpl.isNavigationFinished(this.a.getNavigation()))
return;
this.a.pitch = 0.0F;
if (this.d) {
this.d = false;

View File

@ -19,6 +19,8 @@ public class PlayerControllerLook {
}
public void a() {
if (!NMSImpl.isNavigationFinished(this.a.getNavigation()))
return;
this.a.pitch = 0.0F;
if (this.d) {
this.d = false;