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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
boolean shouldCancel = calcFailed;
|
||||||
if (calcFailed && !knownOreLocations.isEmpty() && Baritone.settings().blacklistClosestOnFailure.value) {
|
if (calcFailed && !knownOreLocations.isEmpty() && Baritone.settings().blacklistClosestOnFailure.value) {
|
||||||
logDirect("Unable to find any path to " + mining + ", blacklisting presumably unreachable closest instance...");
|
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.stream().sorted(Comparator.comparingDouble(ctx.player()::getDistanceSq)).findFirst().ifPresent(blacklist::add);
|
||||||
knownOreLocations.removeIf(blacklist::contains);
|
knownOreLocations.removeIf(blacklist::contains);
|
||||||
calcFailed = false; // 😎
|
shouldCancel = false; // 😎
|
||||||
}
|
}
|
||||||
if (calcFailed) {
|
if (shouldCancel) {
|
||||||
logDirect("Unable to find any path to " + mining + ", canceling Mine");
|
logDirect("Unable to find any path to " + mining + ", canceling Mine");
|
||||||
cancel();
|
cancel();
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user