merge master in
This commit is contained in:
@@ -30,7 +30,6 @@ import baritone.pathing.movement.CalculationContext;
|
||||
import baritone.pathing.movement.MovementHelper;
|
||||
import baritone.utils.BaritoneProcessHelper;
|
||||
import baritone.utils.BlockStateInterface;
|
||||
import baritone.utils.NotificationHelper;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -89,15 +88,15 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
if (calcFailed) {
|
||||
if (!knownOreLocations.isEmpty() && Baritone.settings().blacklistClosestOnFailure.value) {
|
||||
logDirect("Unable to find any path to " + filter + ", blacklisting presumably unreachable closest instance...");
|
||||
if (Baritone.settings().desktopNotifications.value && Baritone.settings().notificationOnMineFail.value) {
|
||||
NotificationHelper.notify("Unable to find any path to " + filter + ", blacklisting presumably unreachable closest instance...", true);
|
||||
if (Baritone.settings().notificationOnMineFail.value) {
|
||||
logNotification("Unable to find any path to " + filter + ", blacklisting presumably unreachable closest instance...", true);
|
||||
}
|
||||
knownOreLocations.stream().min(Comparator.comparingDouble(ctx.playerFeet()::distSqr)).ifPresent(blacklist::add);
|
||||
knownOreLocations.removeIf(blacklist::contains);
|
||||
} else {
|
||||
logDirect("Unable to find any path to " + filter + ", canceling mine");
|
||||
if (Baritone.settings().desktopNotifications.value && Baritone.settings().notificationOnMineFail.value) {
|
||||
NotificationHelper.notify("Unable to find any path to " + filter + ", canceling mine", true);
|
||||
if (Baritone.settings().notificationOnMineFail.value) {
|
||||
logNotification("Unable to find any path to " + filter + ", canceling mine", true);
|
||||
}
|
||||
cancel();
|
||||
return null;
|
||||
@@ -189,10 +188,10 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
return new PathingCommand(goal, legit ? PathingCommandType.FORCE_REVALIDATE_GOAL_AND_PATH : PathingCommandType.REVALIDATE_GOAL_AND_PATH);
|
||||
}
|
||||
// we don't know any ore locations at the moment
|
||||
if (!legit) {
|
||||
if (!legit && !Baritone.settings().exploreForBlocks.value) {
|
||||
return null;
|
||||
}
|
||||
// only in non-Xray mode (aka legit mode) do we do this
|
||||
// only when we should explore for blocks or are in legit mode we do this
|
||||
int y = Baritone.settings().legitMineYLevel.value;
|
||||
if (branchPoint == null) {
|
||||
/*if (!baritone.getPathingBehavior().isPathing() && playerFeet().y == y) {
|
||||
@@ -212,6 +211,10 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
public boolean isInGoal(int x, int y, int z) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public double heuristic() {
|
||||
return Double.NEGATIVE_INFINITY;
|
||||
}
|
||||
};
|
||||
}
|
||||
return new PathingCommand(branchPointRunaway, PathingCommandType.REVALIDATE_GOAL_AND_PATH);
|
||||
@@ -227,10 +230,10 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
||||
List<BlockPos> dropped = droppedItemsScan();
|
||||
List<BlockPos> locs = searchWorld(context, filter, ORE_LOCATIONS_COUNT, already, blacklist, dropped);
|
||||
locs.addAll(dropped);
|
||||
if (locs.isEmpty()) {
|
||||
if (locs.isEmpty() && !Baritone.settings().exploreForBlocks.value) {
|
||||
logDirect("No locations for " + filter + " known, cancelling");
|
||||
if (Baritone.settings().desktopNotifications.value && Baritone.settings().notificationOnMineFail.value) {
|
||||
NotificationHelper.notify("No locations for " + filter + " known, cancelling", true);
|
||||
if (Baritone.settings().notificationOnMineFail.value) {
|
||||
logNotification("No locations for " + filter + " known, cancelling", true);
|
||||
}
|
||||
cancel();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user