From 750da2f1a6ca0ea189eec1e9bf1350ec250a495d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 24 Sep 2018 16:05:02 -0700 Subject: [PATCH] stop breaking on cancel, hopefully fixes #127 --- src/main/java/baritone/behavior/PathingBehavior.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/behavior/PathingBehavior.java b/src/main/java/baritone/behavior/PathingBehavior.java index a13d1015..660ddca1 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -31,6 +31,7 @@ import baritone.pathing.goals.GoalXZ; import baritone.pathing.movement.MovementHelper; import baritone.pathing.path.IPath; import baritone.pathing.path.PathExecutor; +import baritone.utils.BlockBreakHelper; import baritone.utils.BlockStateInterface; import baritone.utils.Helper; import baritone.utils.PathRenderer; @@ -40,7 +41,6 @@ import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.chunk.EmptyChunk; -import java.awt.*; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -218,6 +218,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior, next = null; Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys(); AbstractNodeCostSearch.getCurrentlyRunning().ifPresent(AbstractNodeCostSearch::cancel); + BlockBreakHelper.stopBreakingBlock(); } public void forceCancel() { // NOT exposed on public api