this is so sad
This commit is contained in:
parent
60d246ecc9
commit
2e7f5048dc
@ -105,7 +105,7 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper {
|
||||
}
|
||||
if (goal.isInGoal(currentNodePos)) {
|
||||
currentlyRunning = null;
|
||||
return Optional.of(new Path(startNode, currentNode, goal, numNodes));
|
||||
return Optional.of(new Path(startNode, currentNode, numNodes));
|
||||
}
|
||||
//long constructStart = System.nanoTime();
|
||||
Movement[] possibleMovements = getConnectedPositions(currentNodePos, calcContext);//movement that we could take that start at myPos, in random order
|
||||
@ -184,7 +184,7 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper {
|
||||
}
|
||||
System.out.println("Path goes for " + dist + " blocks");
|
||||
currentlyRunning = null;
|
||||
return Optional.of(new Path(startNode, bestSoFar[i], goal, numNodes));
|
||||
return Optional.of(new Path(startNode, bestSoFar[i], numNodes));
|
||||
}
|
||||
}
|
||||
displayChatMessageRaw("Even with a cost coefficient of " + COEFFICIENTS[COEFFICIENTS.length - 1] + ", I couldn't get more than " + bestDist + " blocks =(");
|
||||
|
@ -121,7 +121,7 @@ public abstract class AbstractNodeCostSearch implements IPathFinder {
|
||||
|
||||
@Override
|
||||
public Optional<IPath> pathToMostRecentNodeConsidered() {
|
||||
return Optional.ofNullable(mostRecentConsidered).map(node -> new Path(startNode, node, goal, 0));
|
||||
return Optional.ofNullable(mostRecentConsidered).map(node -> new Path(startNode, node, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,7 +129,7 @@ public abstract class AbstractNodeCostSearch implements IPathFinder {
|
||||
if (startNode == null || bestSoFar[0] == null)
|
||||
return Optional.empty();
|
||||
|
||||
return Optional.of(new Path(startNode, bestSoFar[0], goal, 0));
|
||||
return Optional.of(new Path(startNode, bestSoFar[0], 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
package baritone.bot.pathing.calc;
|
||||
|
||||
import baritone.bot.pathing.goals.Goal;
|
||||
import baritone.bot.pathing.movement.Movement;
|
||||
import baritone.bot.pathing.path.IPath;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@ -44,11 +43,6 @@ class Path implements IPath {
|
||||
*/
|
||||
final BlockPos end;
|
||||
|
||||
/**
|
||||
* The goal that this path is attempting to accomplish
|
||||
*/
|
||||
final Goal goal;
|
||||
|
||||
/**
|
||||
* The blocks on the path. Guaranteed that path.get(0) equals start and
|
||||
* path.get(path.size()-1) equals end
|
||||
@ -59,10 +53,9 @@ class Path implements IPath {
|
||||
|
||||
private final int numNodes;
|
||||
|
||||
Path(PathNode start, PathNode end, Goal goal, int numNodes) {
|
||||
Path(PathNode start, PathNode end, int numNodes) {
|
||||
this.start = start.pos;
|
||||
this.end = end.pos;
|
||||
this.goal = goal;
|
||||
this.numNodes = numNodes;
|
||||
this.path = new ArrayList<>();
|
||||
this.movements = new ArrayList<>();
|
||||
|
Loading…
Reference in New Issue
Block a user