From f808fc98020c04ad0a0c61d31e1f4acd79d0a707 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 14 Nov 2018 14:27:30 -0800 Subject: [PATCH] general cleanup --- .../pathing/calc/AbstractNodeCostSearch.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java b/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java index 3285a5ce..fa55a998 100644 --- a/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java +++ b/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java @@ -35,11 +35,6 @@ import java.util.Optional; */ public abstract class AbstractNodeCostSearch implements IPathFinder { - /** - * The currently running search task - */ - private static AbstractNodeCostSearch currentlyRunning = null; - protected final int startX; protected final int startY; protected final int startZ; @@ -114,19 +109,10 @@ public abstract class AbstractNodeCostSearch implements IPathFinder { return new PathCalculationResult(PathCalculationResult.Type.EXCEPTION, Optional.empty()); } finally { // this is run regardless of what exception may or may not be raised by calculate0 - currentlyRunning = null; isFinished = true; } } - /** - * Don't set currentlyRunning to this until everything is all ready to go, and we're about to enter the main loop. - * For example, bestSoFar is null so bestPathSoFar (which gets bestSoFar[0]) could NPE if we set currentlyRunning before calculate0 - */ - protected void loopBegin() { - currentlyRunning = this; - } - protected abstract Optional calculate0(long timeout); /** @@ -161,22 +147,6 @@ public abstract class AbstractNodeCostSearch implements IPathFinder { return node; } - public static void forceCancel() { - currentlyRunning = null; - } - - public PathNode mostRecentNodeConsidered() { - return mostRecentConsidered; - } - - public PathNode bestNodeSoFar() { - return bestSoFar[0]; - } - - public PathNode startNode() { - return startNode; - } - @Override public Optional pathToMostRecentNodeConsidered() { try {