Clear caches of schematics when moving them

This commit is contained in:
ZacSharp
2021-02-17 01:59:23 +01:00
parent e97704b37f
commit c880f71dc8
5 changed files with 43 additions and 0 deletions

View File

@@ -380,6 +380,13 @@ 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(){
if (!(realSchematic instanceof IStaticSchematic)){
realSchematic.reset();
}
}
@Override
public int widthX() {
return realSchematic.widthX();
@@ -417,6 +424,9 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
// build repeat time
layer = 0;
origin = new BlockPos(origin).add(repeat);
if (!(schematic instanceof IStaticSchematic) && !Baritone.settings().buildRepeatSneaky.value){
schematic.reset();
}
logDirect("Repeating build in vector " + repeat + ", new origin is " + origin);
return onTick(calcFailed, isSafeToCancel);
}