mirror of https://github.com/cabaletta/baritone
this seems to work as well?
This commit is contained in:
parent
98a87d099b
commit
16a62625b3
|
@ -95,6 +95,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.schematic = schematic;
|
this.schematic = schematic;
|
||||||
this.realSchematic = null;
|
this.realSchematic = null;
|
||||||
|
boolean buildingSelectionSchematic = schematic instanceof SelectionSchematic;
|
||||||
if (!Baritone.settings().buildSubstitutes.value.isEmpty()) {
|
if (!Baritone.settings().buildSubstitutes.value.isEmpty()) {
|
||||||
this.schematic = new SubstituteSchematic(this.schematic, Baritone.settings().buildSubstitutes.value);
|
this.schematic = new SubstituteSchematic(this.schematic, Baritone.settings().buildSubstitutes.value);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +115,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||||
this.paused = false;
|
this.paused = false;
|
||||||
this.layer = Baritone.settings().startAtLayer.value;
|
this.layer = Baritone.settings().startAtLayer.value;
|
||||||
this.stopAtHeight = schematic.heightY();
|
this.stopAtHeight = schematic.heightY();
|
||||||
if (Baritone.settings().buildOnlySelection.value) {
|
if (Baritone.settings().buildOnlySelection.value && buildingSelectionSchematic) { // currently redundant but safer maybe
|
||||||
if (baritone.getSelectionManager().getSelections().length == 0) {
|
if (baritone.getSelectionManager().getSelections().length == 0) {
|
||||||
logDirect("Poor little kitten forgot to set a selection while BuildOnlySelection is true");
|
logDirect("Poor little kitten forgot to set a selection while BuildOnlySelection is true");
|
||||||
this.stopAtHeight = 0;
|
this.stopAtHeight = 0;
|
||||||
|
@ -124,12 +125,10 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||||
if (minim.isPresent() && maxim.isPresent()) {
|
if (minim.isPresent() && maxim.isPresent()) {
|
||||||
int startAtHeight = Baritone.settings().layerOrder.value ? y + schematic.heightY() - maxim.getAsInt() : minim.getAsInt() - y;
|
int startAtHeight = Baritone.settings().layerOrder.value ? y + schematic.heightY() - maxim.getAsInt() : minim.getAsInt() - y;
|
||||||
this.stopAtHeight = (Baritone.settings().layerOrder.value ? y + schematic.heightY() - minim.getAsInt() : maxim.getAsInt() - y) + 1;
|
this.stopAtHeight = (Baritone.settings().layerOrder.value ? y + schematic.heightY() - minim.getAsInt() : maxim.getAsInt() - y) + 1;
|
||||||
this.layer = startAtHeight / Baritone.settings().layerHeight.value;
|
this.layer = Math.max(this.layer, startAtHeight / Baritone.settings().layerHeight.value); // startAtLayer or startAtHeight, whichever is highest
|
||||||
if (Baritone.settings().chatDebug.value) {
|
logDebug(String.format("Schematic starts at y=%s with height %s", y, schematic.heightY()));
|
||||||
logDirect(String.format("Schematic starts at y=%s with height %s", y, schematic.heightY()));
|
logDebug(String.format("Selection starts at y=%s and ends at y=%s", minim.getAsInt(), maxim.getAsInt()));
|
||||||
logDirect(String.format("Selection starts at y=%s and ends at y=%s", minim.getAsInt(), maxim.getAsInt()));
|
logDebug(String.format("Considering relevant height %s - %s", startAtHeight, this.stopAtHeight));
|
||||||
logDirect(String.format("Considering relevant height %s - %s", startAtHeight, this.stopAtHeight));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue