fix: clear above and below plot gen heights if build heights are larger (#2153)

This commit is contained in:
Jordan 2023-03-17 20:56:48 +00:00 committed by GitHub
parent e32a8c40c6
commit 7ab04317fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,6 +145,21 @@ public class FaweDelegateRegionManager {
editSession.setBlocks(fillingRegion, filling); editSession.setBlocks(fillingRegion, filling);
editSession.setBlocks(floorRegion, plotfloor); editSession.setBlocks(floorRegion, plotfloor);
editSession.setBlocks(airRegion, air); editSession.setBlocks(airRegion, air);
if (hybridPlotWorld.getMinBuildHeight() < hybridPlotWorld.getMinGenHeight()) {
Region underneath = new CuboidRegion(
pos1.withY(hybridPlotWorld.getMinBuildHeight()),
pos2.withY(hybridPlotWorld.getMinGenHeight())
);
editSession.setBlocks(underneath, air);
}
if (hybridPlotWorld.getMaxGenHeight() < hybridPlotWorld.getMaxBuildHeight() - 1) {
Region onTop = new CuboidRegion(
pos1.withY(hybridPlotWorld.getMaxGenHeight()),
pos2.withY(hybridPlotWorld.getMaxBuildHeight() - 1)
);
editSession.setBlocks(onTop, air);
}
} }
if (hybridPlotWorld.PLOT_SCHEMATIC) { if (hybridPlotWorld.PLOT_SCHEMATIC) {