From e54ea6c5711929918581bde4874f51ee164f0ca0 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sat, 15 Sep 2018 15:22:34 -0700 Subject: [PATCH] pathingbehavior must emit canceled event for mining to recalc --- 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 944af0d2..205e5001 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -18,11 +18,11 @@ package baritone.behavior; import baritone.Baritone; +import baritone.api.behavior.Behavior; import baritone.api.event.events.PathEvent; import baritone.api.event.events.PlayerUpdateEvent; import baritone.api.event.events.RenderEvent; import baritone.api.event.events.TickEvent; -import baritone.api.behavior.Behavior; import baritone.pathing.calc.AStarPathFinder; import baritone.pathing.calc.AbstractNodeCostSearch; import baritone.pathing.calc.IPathFinder; @@ -194,6 +194,7 @@ public final class PathingBehavior extends Behavior implements Helper { } public void cancel() { + dispatchPathEvent(PathEvent.CANCELED); current = null; next = null; Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys();