From 7ab04317fa28495eb1db1cb69a649969f0eaf9e6 Mon Sep 17 00:00:00 2001 From: Jordan Date: Fri, 17 Mar 2023 20:56:48 +0000 Subject: [PATCH] fix: clear above and below plot gen heights if build heights are larger (#2153) --- .../plotsquared/FaweDelegateRegionManager.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java index e965644ed..e20c73809 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java @@ -145,6 +145,21 @@ public class FaweDelegateRegionManager { editSession.setBlocks(fillingRegion, filling); editSession.setBlocks(floorRegion, plotfloor); 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) {