epic label

This commit is contained in:
Leijurv 2019-05-07 21:40:03 -08:00
parent da8bf6b1b3
commit c738007538
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -88,14 +88,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().min(Comparator.comparingDouble(ctx.player()::getDistanceSq)).ifPresent(blacklist::add);
knownOreLocations.removeIf(blacklist::contains);
shouldCancel = false; // 😎
}
if (shouldCancel) {
CANCEL:
if (calcFailed) {
if (!knownOreLocations.isEmpty() && Baritone.settings().blacklistClosestOnFailure.value) {
logDirect("Unable to find any path to " + mining + ", blacklisting presumably unreachable closest instance...");
knownOreLocations.stream().min(Comparator.comparingDouble(ctx.player()::getDistanceSq)).ifPresent(blacklist::add);
knownOreLocations.removeIf(blacklist::contains);
break CANCEL; // 😎
}
logDirect("Unable to find any path to " + mining + ", canceling Mine");
cancel();
return null;