From 60c29fd1594cf42eb2675d59c1b867d96d1446cd Mon Sep 17 00:00:00 2001 From: leijurv Date: Sun, 7 Oct 2018 21:39:43 -0700 Subject: [PATCH] actually stop sprinting, fixes #199 --- src/main/java/baritone/pathing/path/PathExecutor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index cc140941b..4afd8b761 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -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 if (!new CalculationContext().canSprint()) { + Baritone.INSTANCE.getInputOverrideHandler().setInputForceState(InputOverrideHandler.Input.SPRINT,false); player().setSprinting(false); return; } @@ -341,6 +342,9 @@ public class PathExecutor implements Helper { 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 Movement current = path.movements().get(pathPosition); if (current instanceof MovementDescend && pathPosition < path.length() - 2) {