actually stop sprinting, fixes #199
This commit is contained in:
parent
7481c98dbc
commit
60c29fd159
@ -329,6 +329,7 @@ public class PathExecutor implements Helper {
|
|||||||
|
|
||||||
// first and foremost, if allowSprint is off, or if we don't have enough hunger, don't try and sprint
|
// first and foremost, if allowSprint is off, or if we don't have enough hunger, don't try and sprint
|
||||||
if (!new CalculationContext().canSprint()) {
|
if (!new CalculationContext().canSprint()) {
|
||||||
|
Baritone.INSTANCE.getInputOverrideHandler().setInputForceState(InputOverrideHandler.Input.SPRINT,false);
|
||||||
player().setSprinting(false);
|
player().setSprinting(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -341,6 +342,9 @@ public class PathExecutor implements Helper {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we'll take it from here, no need for minecraft to see we're holding down control and sprint for us
|
||||||
|
Baritone.INSTANCE.getInputOverrideHandler().setInputForceState(InputOverrideHandler.Input.SPRINT,false);
|
||||||
|
|
||||||
// however, descend doesn't request sprinting, beceause it doesn't know the context of what movement comes after it
|
// however, descend doesn't request sprinting, beceause it doesn't know the context of what movement comes after it
|
||||||
Movement current = path.movements().get(pathPosition);
|
Movement current = path.movements().get(pathPosition);
|
||||||
if (current instanceof MovementDescend && pathPosition < path.length() - 2) {
|
if (current instanceof MovementDescend && pathPosition < path.length() - 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user