forked from RepoMirrors/baritone
trim big schematics
This commit is contained in:
parent
3e94d92fbd
commit
963641a818
|
@ -280,6 +280,7 @@ public class BuilderProcess extends BaritoneProcessHelper implements IBuilderPro
|
||||||
onLostControl();
|
onLostControl();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
trim(bcc);
|
||||||
if (baritone.getInputOverrideHandler().isInputForcedDown(Input.CLICK_LEFT)) {
|
if (baritone.getInputOverrideHandler().isInputForcedDown(Input.CLICK_LEFT)) {
|
||||||
ticks = 5;
|
ticks = 5;
|
||||||
} else {
|
} else {
|
||||||
|
@ -366,6 +367,14 @@ public class BuilderProcess extends BaritoneProcessHelper implements IBuilderPro
|
||||||
return !incorrectPositions.isEmpty();
|
return !incorrectPositions.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void trim(BuilderCalculationContext bcc) {
|
||||||
|
HashSet<BetterBlockPos> copy = new HashSet<>(incorrectPositions);
|
||||||
|
copy.removeIf(pos -> pos.distanceSq(ctx.player().posX, ctx.player().posY, ctx.player().posZ) > 200);
|
||||||
|
if (!copy.isEmpty()) {
|
||||||
|
incorrectPositions = copy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void recalcNearby(BuilderCalculationContext bcc) {
|
public void recalcNearby(BuilderCalculationContext bcc) {
|
||||||
BetterBlockPos center = ctx.playerFeet();
|
BetterBlockPos center = ctx.playerFeet();
|
||||||
for (int dx = -5; dx <= 5; dx++) {
|
for (int dx = -5; dx <= 5; dx++) {
|
||||||
|
|
Loading…
Reference in New Issue