dont reassign arg
This commit is contained in:
parent
bf076f6246
commit
87a9e67ba8
@ -81,13 +81,14 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
return null;
|
||||
}
|
||||
}
|
||||
boolean shouldCancel = calcFailed;
|
||||
if (calcFailed && !knownOreLocations.isEmpty() && Baritone.settings().blacklistClosestOnFailure.value) {
|
||||
logDirect("Unable to find any path to " + mining + ", blacklisting presumably unreachable closest instance...");
|
||||
knownOreLocations.stream().sorted(Comparator.comparingDouble(ctx.player()::getDistanceSq)).findFirst().ifPresent(blacklist::add);
|
||||
knownOreLocations.removeIf(blacklist::contains);
|
||||
calcFailed = false; // 😎
|
||||
shouldCancel = false; // 😎
|
||||
}
|
||||
if (calcFailed) {
|
||||
if (shouldCancel) {
|
||||
logDirect("Unable to find any path to " + mining + ", canceling Mine");
|
||||
cancel();
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user