add ability to build from opposite corner

This commit is contained in:
Leijurv 2019-09-15 11:37:09 -07:00
parent bf03a000d1
commit cccd61e050
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 28 additions and 1 deletions

View File

@ -742,6 +742,21 @@ public final class Settings {
*/
public final Setting<Double> breakCorrectBlockPenaltyMultiplier = new Setting<>(10d);
/**
* When this setting is true, build a schematic with the highest X coordinate being the origin, instead of the lowest
*/
public final Setting<Boolean> schematicOrientationX = new Setting<>(false);
/**
* When this setting is true, build a schematic with the highest Y coordinate being the origin, instead of the lowest
*/
public final Setting<Boolean> schematicOrientationY = new Setting<>(false);
/**
* When this setting is true, build a schematic with the highest Z coordinate being the origin, instead of the lowest
*/
public final Setting<Boolean> schematicOrientationZ = new Setting<>(false);
/**
* While mining, should it also consider dropped items of the correct type as a pathing destination (as well as ore blocks)?
*/

View File

@ -78,7 +78,19 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
this.name = name;
this.schematic = schematic;
this.realSchematic = null;
this.origin = origin;
int x = origin.getX();
int y = origin.getY();
int z = origin.getZ();
if (Baritone.settings().schematicOrientationX.value) {
x += schematic.widthX();
}
if (Baritone.settings().schematicOrientationY.value) {
y += schematic.heightY();
}
if (Baritone.settings().schematicOrientationZ.value) {
z += schematic.lengthZ();
}
this.origin = new Vec3i(x, y, z);
this.paused = false;
this.layer = 0;
this.observedCompleted = new LongOpenHashSet();