diff --git a/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java index 7a4924323..f996807ed 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java @@ -524,23 +524,23 @@ public class ClassicPlotManager extends SquarePlotManager { Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMinGenHeight(), ez - 1), BlockTypes.BEDROCK.getDefaultState() ); - queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + 1, sz + 1), - Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT, ez - 1), - classicPlotWorld.WALL_FILLING.toPattern() - ); - } else { - queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight(), sz + 1), - Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT, ez - 1), - classicPlotWorld.WALL_FILLING.toPattern() - ); } + int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0; queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight(), sz + 1), + Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1), + Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT, ez - 1), + classicPlotWorld.WALL_FILLING.toPattern() + ); + queue.setCuboid( + Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1), Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT, ez - 1), classicPlotWorld.WALL_FILLING.toPattern() ); + queue.setCuboid( + Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1), + Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), + classicPlotWorld.ROAD_BLOCK.toPattern() + ); if (classicPlotWorld.PLACE_TOP_BLOCK) { queue.setCuboid( @@ -548,24 +548,12 @@ public class ClassicPlotManager extends SquarePlotManager { Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.WALL_HEIGHT + 1, ez - 1), classicPlotWorld.WALL_BLOCK.toPattern() ); - } - queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMinGenHeight() + 1, sz + 1), - Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT, ez - 1), - classicPlotWorld.WALL_FILLING.toPattern() - ); - if (classicPlotWorld.PLACE_TOP_BLOCK) { queue.setCuboid( Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT + 1, sz + 1), Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.WALL_HEIGHT + 1, ez - 1), classicPlotWorld.WALL_BLOCK.toPattern() ); } - queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + 1, sz + 1), - Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), - classicPlotWorld.ROAD_BLOCK.toPattern() - ); return !enqueue || queue.enqueue(); } @@ -601,11 +589,22 @@ public class ClassicPlotManager extends SquarePlotManager { BlockTypes.BEDROCK.getDefaultState() ); } + int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0; queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz), + Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz), Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT, sz), classicPlotWorld.WALL_FILLING.toPattern() ); + queue.setCuboid( + Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, ez), + Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT, ez), + classicPlotWorld.WALL_FILLING.toPattern() + ); + queue.setCuboid( + Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1), + Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), + classicPlotWorld.ROAD_BLOCK.toPattern() + ); if (classicPlotWorld.PLACE_TOP_BLOCK) { queue.setCuboid( @@ -613,24 +612,12 @@ public class ClassicPlotManager extends SquarePlotManager { Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT + 1, sz), classicPlotWorld.WALL_BLOCK.toPattern() ); - } - queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, ez), - Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT, ez), - classicPlotWorld.WALL_FILLING.toPattern() - ); - if (classicPlotWorld.PLACE_TOP_BLOCK) { queue.setCuboid( Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.WALL_HEIGHT + 1, ez), Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.WALL_HEIGHT + 1, ez), classicPlotWorld.WALL_BLOCK.toPattern() ); } - queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz + 1), - Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), - classicPlotWorld.ROAD_BLOCK.toPattern() - ); return !enqueue || queue.enqueue(); } @@ -661,8 +648,9 @@ public class ClassicPlotManager extends SquarePlotManager { BlockTypes.BEDROCK.getDefaultState() ); } + int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0; queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz + 1), + Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1), Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.ROAD_HEIGHT, ez - 1), classicPlotWorld.ROAD_BLOCK.toPattern() ); @@ -695,8 +683,9 @@ public class ClassicPlotManager extends SquarePlotManager { Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez), BlockTypes.AIR.getDefaultState() ); + int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0; queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx, 1, sz + 1), + Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + startYOffset, sz + 1), Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.PLOT_HEIGHT - 1, ez - 1), classicPlotWorld.MAIN_BLOCK.toPattern() ); @@ -735,8 +724,9 @@ public class ClassicPlotManager extends SquarePlotManager { Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez), BlockTypes.AIR.getDefaultState() ); + int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0; queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx + 1, 1, sz), + Location.at(classicPlotWorld.getWorldName(), sx + 1, classicPlotWorld.getMinGenHeight() + startYOffset, sz), Location.at(classicPlotWorld.getWorldName(), ex - 1, classicPlotWorld.PLOT_HEIGHT - 1, ez), classicPlotWorld.MAIN_BLOCK.toPattern() ); @@ -774,8 +764,9 @@ public class ClassicPlotManager extends SquarePlotManager { Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.getMaxGenHeight(), ez), BlockTypes.AIR.getDefaultState() ); + int startYOffset = classicPlotWorld.PLOT_BEDROCK ? 1 : 0; queue.setCuboid( - Location.at(classicPlotWorld.getWorldName(), sx, 1, sz), + Location.at(classicPlotWorld.getWorldName(), sx, classicPlotWorld.getMinGenHeight() + startYOffset, sz), Location.at(classicPlotWorld.getWorldName(), ex, classicPlotWorld.PLOT_HEIGHT - 1, ez), classicPlotWorld.MAIN_BLOCK.toPattern() );