Prevent flying capabilities when pathing, fixes #130
This commit is contained in:
parent
ff2714b15f
commit
e6c574063e
@ -196,6 +196,7 @@ public class PathingBehavior extends Behavior {
|
|||||||
next = null;
|
next = null;
|
||||||
Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys();
|
Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys();
|
||||||
AbstractNodeCostSearch.getCurrentlyRunning().ifPresent(AbstractNodeCostSearch::cancel);
|
AbstractNodeCostSearch.getCurrentlyRunning().ifPresent(AbstractNodeCostSearch::cancel);
|
||||||
|
mc.playerController.setPlayerCapabilities(mc.player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -236,6 +236,7 @@ public class PathExecutor implements Helper {
|
|||||||
Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys();
|
Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
player().capabilities.allowFlying = false;
|
||||||
MovementState.MovementStatus movementStatus = movement.update();
|
MovementState.MovementStatus movementStatus = movement.update();
|
||||||
if (movementStatus == UNREACHABLE || movementStatus == FAILED) {
|
if (movementStatus == UNREACHABLE || movementStatus == FAILED) {
|
||||||
logDebug("Movement returns status " + movementStatus);
|
logDebug("Movement returns status " + movementStatus);
|
||||||
|
Loading…
Reference in New Issue
Block a user