This commit is contained in:
Leijurv
2018-08-03 01:14:33 -04:00
parent 9bd94fc8d2
commit 33ab4af3a3
2 changed files with 24 additions and 17 deletions

View File

@@ -56,6 +56,8 @@ public abstract class AbstractNodeCostSearch implements IPathFinder {
}
protected PathNode getNodeAtPosition(BlockPos pos) {
//technically I think this could be map.computeIfAbsent(pos, pos -> new PathNode(pos, goal))
//but this is so core to the pathfinder that I'm wary of the lambda performance, hmmm
PathNode alr = map.get(pos);
if (alr == null) {
PathNode node = new PathNode(pos, goal);