Make MIN_DIST_PATH configurable within the settings#251
Make MIN_DIST_PATH configurable within the settings#251Not-a-Tyler wants to merge 1 commit intorfresh2:1.21.4from
Conversation
|
Please do not open pull requests from branches of the same name (e.g. '1.21.4'), create a new branch instead |
|
i looked into why baritone uses 5 blocks https://docs.google.com/document/d/1WVHHXKXFdCR1Oz__KtK8sFqyvSwJN_H4lftkHFgmzlc
and i think i have another solution public Optional<IPath> bestSoFar(final int numNodes) {
return bestSoFar(numNodes, MIN_DIST_PATH).or(() -> bestSoFar(numNodes, 1));
}
public Optional<IPath> bestSoFar(int numNodes, double minDist) {
...
for (int i = 0; i < COEFFICIENTS.length; i++) {
...
if (dist > minDist * minDist) { // square the comparison since distFromStartSq is squared
return Optional.of(new Path(realStart, startNode, bestSoFar[i], numNodes, goal, context));
}
}
return Optional.empty();
}we get original intent of 5 blocks, and if that fails pathing can fall back to a 1 dist min |
Makes it so much easier to do automation in zenith, goal nears wont try to go to the exact block you want, they will only get within the goal near distance and quit, and goal blocks will always try to build to get to the exact block position instead of going to closest position.