add force cancel
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
package baritone.pathing.calc;
|
||||
|
||||
import baritone.behavior.impl.PathingBehavior;
|
||||
import baritone.pathing.goals.Goal;
|
||||
import baritone.pathing.path.IPath;
|
||||
import baritone.utils.pathing.BetterBlockPos;
|
||||
@@ -121,6 +122,11 @@ public abstract class AbstractNodeCostSearch implements IPathFinder {
|
||||
return node;
|
||||
}
|
||||
|
||||
public static void forceCancel() {
|
||||
PathingBehavior.INSTANCE.cancel();
|
||||
currentlyRunning = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<IPath> pathToMostRecentNodeConsidered() {
|
||||
return Optional.ofNullable(mostRecentConsidered).map(node -> new Path(startNode, node, 0));
|
||||
|
||||
Reference in New Issue
Block a user