fix: clear above and below plot gen heights if build heights are larger

This commit is contained in:
dordsor21 2023-03-17 16:14:47 +00:00
parent 745b06a008
commit cc1e209ea4
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -288,6 +288,13 @@ public class HybridPlotManager extends ClassicPlotManager {
queue.setCompleteTask(whenDone); queue.setCompleteTask(whenDone);
} }
if (!canRegen) { if (!canRegen) {
if (hybridPlotWorld.getMinBuildHeight() < hybridPlotWorld.getMinGenHeight()) {
queue.setCuboid(
pos1.withY(hybridPlotWorld.getMinBuildHeight()),
pos2.withY(hybridPlotWorld.getMinGenHeight()),
BlockTypes.AIR.getDefaultState()
);
}
queue.setCuboid( queue.setCuboid(
pos1.withY(hybridPlotWorld.getMinGenHeight()), pos1.withY(hybridPlotWorld.getMinGenHeight()),
pos2.withY(hybridPlotWorld.getMinGenHeight()), pos2.withY(hybridPlotWorld.getMinGenHeight()),
@ -305,6 +312,13 @@ public class HybridPlotManager extends ClassicPlotManager {
pos2.withY(hybridPlotWorld.getMaxGenHeight()), pos2.withY(hybridPlotWorld.getMaxGenHeight()),
BlockTypes.AIR.getDefaultState() BlockTypes.AIR.getDefaultState()
); );
if (hybridPlotWorld.getMaxGenHeight() < hybridPlotWorld.getMaxBuildHeight() - 1) {
queue.setCuboid(
pos1.withY(hybridPlotWorld.getMaxGenHeight()),
pos2.withY(hybridPlotWorld.getMaxBuildHeight() - 1),
BlockTypes.AIR.getDefaultState()
);
}
queue.setBiomeCuboid(pos1, pos2, biome); queue.setBiomeCuboid(pos1, pos2, biome);
} else { } else {
queue.setRegenRegion(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3())); queue.setRegenRegion(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()));