This commit is contained in:
Leijurv 2019-05-26 12:14:08 -07:00
parent 44327c009a
commit 18474d872c
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -359,7 +359,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
logDirect("Repeating build in vector " + repeat + ", new origin is " + origin); logDirect("Repeating build in vector " + repeat + ", new origin is " + origin);
return onTick(calcFailed, isSafeToCancel); return onTick(calcFailed, isSafeToCancel);
} }
trim(bcc); trim();
Optional<Tuple<BetterBlockPos, Rotation>> toBreak = toBreakNearPlayer(bcc); Optional<Tuple<BetterBlockPos, Rotation>> toBreak = toBreakNearPlayer(bcc);
if (toBreak.isPresent() && isSafeToCancel && ctx.player().onGround) { if (toBreak.isPresent() && isSafeToCancel && ctx.player().onGround) {
@ -447,7 +447,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
return !incorrectPositions.isEmpty(); return !incorrectPositions.isEmpty();
} }
private void trim(BuilderCalculationContext bcc) { private void trim() {
HashSet<BetterBlockPos> copy = new HashSet<>(incorrectPositions); HashSet<BetterBlockPos> copy = new HashSet<>(incorrectPositions);
copy.removeIf(pos -> pos.distanceSq(ctx.player().posX, ctx.player().posY, ctx.player().posZ) > 200); copy.removeIf(pos -> pos.distanceSq(ctx.player().posX, ctx.player().posY, ctx.player().posZ) > 200);
if (!copy.isEmpty()) { if (!copy.isEmpty()) {