whoops, that was dumb

This commit is contained in:
Leijurv 2020-11-25 01:19:53 -08:00
parent 4a489d29de
commit f0082990e9
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 4 additions and 3 deletions

View File

@ -59,7 +59,7 @@ public final class AStarPathFinder extends AbstractNodeCostSearch {
bestHeuristicSoFar[i] = startNode.estimatedCostToGoal;
bestSoFar[i] = startNode;
}
MutableMoveResult res = new MutableMoveResult();
MutableMoveResult mutableMoveResult = new MutableMoveResult();
BetterWorldBorder worldBorder = new BetterWorldBorder(calcContext.world.getWorldBorder());
long startTime = System.currentTimeMillis();
boolean slowPath = Baritone.settings().slowPath.value;
@ -112,8 +112,9 @@ public final class AStarPathFinder extends AbstractNodeCostSearch {
if (currentNode.y + moves.yOffset > 256 || currentNode.y + moves.yOffset < 0) {
continue;
}
res.reset();
moves.apply(calcContext, currentNode.x, currentNode.y, currentNode.z, res);
mutableMoveResult.reset();
moves.apply(calcContext, currentNode.x, currentNode.y, currentNode.z, mutableMoveResult);
MutableMoveResult res = mutableMoveResult;
while (res != null) {
numMovementsConsidered++;
double actionCost = res.cost;