Merge pull request #2482 from ZacSharp/schematicCacheClearing

Clear caches of schematics when moving them
This commit is contained in:
Leijurv
2021-02-19 16:06:28 -08:00
committed by GitHub
5 changed files with 39 additions and 0 deletions

View File

@@ -387,6 +387,11 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
return ISchematic.super.inSchematic(x, y, z, currentState) && y >= minYInclusive && y <= maxYInclusive && realSchematic.inSchematic(x, y, z, currentState);
}
@Override
public void reset() {
realSchematic.reset();
}
@Override
public int widthX() {
return realSchematic.widthX();
@@ -424,6 +429,9 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
// build repeat time
layer = 0;
origin = new BlockPos(origin).add(repeat);
if (!Baritone.settings().buildRepeatSneaky.value) {
schematic.reset();
}
logDirect("Repeating build in vector " + repeat + ", new origin is " + origin);
return onTick(calcFailed, isSafeToCancel, recursions + 1);
}