This commit is contained in:
Brady 2018-11-17 11:41:16 -06:00
parent 6caae889b7
commit 689dc74330
No known key found for this signature in database
GPG Key ID: 73A788379A197567
1 changed files with 2 additions and 4 deletions

View File

@ -483,10 +483,8 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
transformed = new GoalXZ(pos.getX(), pos.getZ());
}
}
HashSet<Long> favoredPositions;
if (Baritone.settings().backtrackCostFavoringCoefficient.get() == 1D) {
favoredPositions = null;
} else {
HashSet<Long> favoredPositions = null;
if (Baritone.settings().backtrackCostFavoringCoefficient.get() != 1D && previous != null) {
favoredPositions = previous.positions().stream().map(BetterBlockPos::longHash).collect(Collectors.toCollection(HashSet::new));
}
return new AStarPathFinder(start.getX(), start.getY(), start.getZ(), transformed, favoredPositions, context);