Filter blocks where avoidBreaking returns false

shaft-mining checks `avoidBreaking` so not checking it here can cause
Baritone to walk to a position and then do nothing.
This commit is contained in:
ZacSharp
2025-02-27 15:36:59 +01:00
parent 849072f8ca
commit f3086c2231

View File

@@ -486,7 +486,11 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
public static boolean plausibleToBreak(CalculationContext ctx, BlockPos pos) {
if (MovementHelper.getMiningDurationTicks(ctx, pos.getX(), pos.getY(), pos.getZ(), ctx.bsi.get0(pos), true) >= COST_INF) {
BlockState state = ctx.bsi.get0(pos);
if (MovementHelper.getMiningDurationTicks(ctx, pos.getX(), pos.getY(), pos.getZ(), state, true) >= COST_INF) {
return false;
}
if (MovementHelper.avoidBreaking(ctx.bsi, pos.getX(), pos.getY(), pos.getZ(), state)) {
return false;
}