From 9fb46946b57c110df8aacb37fad70e27fc886b05 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 27 Feb 2020 18:05:05 -0800 Subject: [PATCH] fix sprint while paused bug, fixes #1331 --- src/launch/java/baritone/launch/mixins/MixinMinecraft.java | 2 +- src/main/java/baritone/behavior/PathingBehavior.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/launch/java/baritone/launch/mixins/MixinMinecraft.java b/src/launch/java/baritone/launch/mixins/MixinMinecraft.java index 3de4a0f5..51e9959f 100644 --- a/src/launch/java/baritone/launch/mixins/MixinMinecraft.java +++ b/src/launch/java/baritone/launch/mixins/MixinMinecraft.java @@ -145,7 +145,7 @@ public class MixinMinecraft { ) private boolean isAllowUserInput(GuiScreen screen) { // allow user input is only the primary baritone - return (BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().getCurrent() != null && player != null) || screen.allowUserInput; + return (BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing() && player != null) || screen.allowUserInput; } @Inject( diff --git a/src/main/java/baritone/behavior/PathingBehavior.java b/src/main/java/baritone/behavior/PathingBehavior.java index 86fd9505..50ca7425 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -103,7 +103,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior, @Override public void onPlayerSprintState(SprintStateEvent event) { - if (current != null) { + if (isPathing()) { event.setState(current.isSprinting()); } }