diff --git a/src/main/java/baritone/pathing/movement/Movement.java b/src/main/java/baritone/pathing/movement/Movement.java index 82418574b..1e049a2e4 100644 --- a/src/main/java/baritone/pathing/movement/Movement.java +++ b/src/main/java/baritone/pathing/movement/Movement.java @@ -29,7 +29,6 @@ import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.chunk.EmptyChunk; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Optional; @@ -217,61 +216,7 @@ public abstract class Movement implements Helper, MovementHelper { public void reset() { currentState = new MovementState().setStatus(MovementStatus.PREPPING); } - - public double getTotalHardnessOfBlocksToBreak(CalculationContext ctx) { - if (positionsToBreak.length == 0) { - return 0; - } - if (positionsToBreak.length == 1) { - return MovementHelper.getMiningDurationTicks(ctx, positionsToBreak[0], true); - } - int firstColumnX = positionsToBreak[0].getX(); - int firstColumnZ = positionsToBreak[0].getZ(); - int firstColumnMaxY = positionsToBreak[0].getY(); - int firstColumnMaximalIndex = 0; - boolean hasSecondColumn = false; - int secondColumnX = -1; - int secondColumnZ = -1; - int secondColumnMaxY = -1; - int secondColumnMaximalIndex = -1; - for (int i = 0; i < positionsToBreak.length; i++) { - BlockPos pos = positionsToBreak[i]; - if (pos.getX() == firstColumnX && pos.getZ() == firstColumnZ) { - if (pos.getY() > firstColumnMaxY) { - firstColumnMaxY = pos.getY(); - firstColumnMaximalIndex = i; - } - } else { - if (!hasSecondColumn || (pos.getX() == secondColumnX && pos.getZ() == secondColumnZ)) { - if (hasSecondColumn) { - if (pos.getY() > secondColumnMaxY) { - secondColumnMaxY = pos.getY(); - secondColumnMaximalIndex = i; - } - } else { - hasSecondColumn = true; - secondColumnX = pos.getX(); - secondColumnZ = pos.getZ(); - secondColumnMaxY = pos.getY(); - secondColumnMaximalIndex = i; - } - } else { - throw new IllegalStateException("I literally have no idea " + Arrays.asList(positionsToBreak)); - } - } - } - - double sum = 0; - for (int i = 0; i < positionsToBreak.length; i++) { - sum += MovementHelper.getMiningDurationTicks(ctx, positionsToBreak[i], firstColumnMaximalIndex == i || secondColumnMaximalIndex == i); - if (sum >= COST_INF) { - break; - } - } - return sum; - } - - + /** * Calculate latest movement state. * Gets called once a tick.