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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user