1
0
mirror of https://github.com/cabaletta/baritone synced 2024-12-27 09:22:20 +00:00

pathingbehavior must emit canceled event for mining to recalc

This commit is contained in:
Leijurv 2018-09-15 15:22:34 -07:00
parent 43cf2062bc
commit e54ea6c571
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -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();