diff --git a/src/api/java/baritone/api/pathing/goals/GoalComposite.java b/src/api/java/baritone/api/pathing/goals/GoalComposite.java index ebaf38eda..47522492b 100644 --- a/src/api/java/baritone/api/pathing/goals/GoalComposite.java +++ b/src/api/java/baritone/api/pathing/goals/GoalComposite.java @@ -61,7 +61,7 @@ public class GoalComposite implements Goal { public double heuristic() { double min = Double.MAX_VALUE; for (Goal g : goals) { - //just take the highest value that is guaranteed to be inside the goal + // just take the highest value that is guaranteed to be inside the goal min = Math.min(min, g.heuristic()); } return min; diff --git a/src/api/java/baritone/api/pathing/goals/GoalNear.java b/src/api/java/baritone/api/pathing/goals/GoalNear.java index 0657c1724..2ae2decc2 100644 --- a/src/api/java/baritone/api/pathing/goals/GoalNear.java +++ b/src/api/java/baritone/api/pathing/goals/GoalNear.java @@ -55,7 +55,7 @@ public class GoalNear implements Goal, IGoalRenderPos { } @Override - public double heuristic() {//TODO less hacky solution + public double heuristic() {// TODO less hacky solution int range = (int) Math.ceil(Math.sqrt(rangeSq)); HashSet maybeAlwaysInside = new HashSet<>(); HashSet sometimesOutside = new HashSet<>(); diff --git a/src/api/java/baritone/api/pathing/goals/GoalRunAway.java b/src/api/java/baritone/api/pathing/goals/GoalRunAway.java index 7983d6fcc..e66cbb828 100644 --- a/src/api/java/baritone/api/pathing/goals/GoalRunAway.java +++ b/src/api/java/baritone/api/pathing/goals/GoalRunAway.java @@ -68,7 +68,7 @@ public class GoalRunAway implements Goal { } @Override - public double heuristic(int x, int y, int z) {//mostly copied from GoalBlock + public double heuristic(int x, int y, int z) {// mostly copied from GoalBlock double min = Double.MAX_VALUE; for (BlockPos p : from) { double h = GoalXZ.calculate(p.getX() - x, p.getZ() - z); @@ -84,7 +84,7 @@ public class GoalRunAway implements Goal { } @Override - public double heuristic() {//TODO less hacky solution + public double heuristic() {// TODO less hacky solution int distance = (int) Math.ceil(Math.sqrt(distanceSq)); int minX = from[0].getX() - distance; int minY = from[0].getY() - distance; diff --git a/src/main/java/baritone/behavior/PathingBehavior.java b/src/main/java/baritone/behavior/PathingBehavior.java index 967df1b33..f9c56c5a4 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -391,7 +391,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior, } double current = goal.heuristic(currentPos.x, currentPos.y, currentPos.z); double start = goal.heuristic(startPosition.x, startPosition.y, startPosition.z); - if (current == start) {//can't check above because current and start can be equal even if currentPos and startPosition are not + if (current == start) {// can't check above because current and start can be equal even if currentPos and startPosition are not return Optional.empty(); } double eta = Math.abs(current - goal.heuristic()) * ticksElapsedSoFar / Math.abs(start - current);