From e75d0ff102635d0479e8d0557f33eff60cd06e62 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 16 Sep 2018 17:25:14 -0700 Subject: [PATCH] huh thats neat --- .../baritone/pathing/calc/AbstractNodeCostSearch.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java b/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java index f4d909860..6e8220e10 100644 --- a/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java +++ b/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java @@ -89,14 +89,10 @@ public abstract class AbstractNodeCostSearch implements IPathFinder { path.ifPresent(IPath::postprocess); isFinished = true; return path; - } catch (Exception e) { + } finally { + // this is run regardless of what exception may or may not be raised by calculate0 currentlyRunning = null; isFinished = true; - if (e instanceof RuntimeException) { - throw (RuntimeException) e; - } else { - throw new RuntimeException(e); - } } } @@ -122,10 +118,9 @@ public abstract class AbstractNodeCostSearch implements IPathFinder { * for the node mapped to the specified pos. If no node is found, * a new node is created. * - * @see Issue #107 - * * @param pos The pos to lookup * @return The associated node + * @see Issue #107 */ protected PathNode getNodeAtPosition(BetterBlockPos pos) { long hashCode = pos.hashCode;