huh thats neat

This commit is contained in:
Leijurv 2018-09-16 17:25:14 -07:00
parent dbd1fb2aa2
commit e75d0ff102
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -89,14 +89,10 @@ public abstract class AbstractNodeCostSearch implements IPathFinder {
path.ifPresent(IPath::postprocess); path.ifPresent(IPath::postprocess);
isFinished = true; isFinished = true;
return path; return path;
} catch (Exception e) { } finally {
// this is run regardless of what exception may or may not be raised by calculate0
currentlyRunning = null; currentlyRunning = null;
isFinished = true; 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, * for the node mapped to the specified pos. If no node is found,
* a new node is created. * a new node is created.
* *
* @see <a href="https://github.com/cabaletta/baritone/issues/107">Issue #107</a>
*
* @param pos The pos to lookup * @param pos The pos to lookup
* @return The associated node * @return The associated node
* @see <a href="https://github.com/cabaletta/baritone/issues/107">Issue #107</a>
*/ */
protected PathNode getNodeAtPosition(BetterBlockPos pos) { protected PathNode getNodeAtPosition(BetterBlockPos pos) {
long hashCode = pos.hashCode; long hashCode = pos.hashCode;