load boundary cutoff setting
This commit is contained in:
parent
d3bd6ae843
commit
922671c77d
@ -51,6 +51,7 @@ public class Settings {
|
||||
public Setting<Boolean> backtrackCostFavor = new Setting<>(true); // see issue #18
|
||||
public Setting<Double> backtrackCostFavoringCoefficient = new Setting<>(0.9); // see issue #18
|
||||
public Setting<Boolean> minimumImprovementRepropagation = new Setting<>(true);
|
||||
public Setting<Boolean> cutoffAtLoadBoundary = new Setting<>(true);
|
||||
|
||||
public Setting<Number> pathTimeoutMS = new Setting<>(4000L);
|
||||
|
||||
|
@ -201,13 +201,17 @@ public class PathingBehavior extends Behavior {
|
||||
displayChatMessageRaw("Starting to search for path from " + start + " to " + goal);
|
||||
}
|
||||
|
||||
findPath(start, previous).map(IPath::cutoffAtLoadedChunks).map(PathExecutor::new).ifPresent(path -> {
|
||||
Optional<IPath> path = findPath(start, previous);
|
||||
if (Baritone.settings().cutoffAtLoadBoundary.get()) {
|
||||
path = path.map(IPath::cutoffAtLoadedChunks);
|
||||
}
|
||||
path.map(PathExecutor::new).ifPresent(p -> {
|
||||
synchronized (pathPlanLock) {
|
||||
if (current == null) {
|
||||
current = path;
|
||||
current = p;
|
||||
} else {
|
||||
if (next == null) {
|
||||
next = path;
|
||||
next = p;
|
||||
} else {
|
||||
throw new IllegalStateException("I have no idea what to do with this path");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user