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 f4877e4ab..7a4924323 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java @@ -245,7 +245,6 @@ public class ClassicPlotManager extends SquarePlotManager { int x = MathMan.average(corners[0].getX(), corners[1].getX()); int z = MathMan.average(corners[0].getZ(), corners[1].getZ()); queue.setBlock(x, classicPlotWorld.PLOT_HEIGHT, z, blocks); - System.out.println(classicPlotWorld.PLOT_HEIGHT); return !enqueue || queue.enqueue(); } diff --git a/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java index fa5e36900..32660f147 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotWorld.java @@ -25,6 +25,7 @@ */ package com.plotsquared.core.generator; +import com.plotsquared.core.PlotSquared; import com.plotsquared.core.configuration.ConfigurationNode; import com.plotsquared.core.configuration.ConfigurationSection; import com.plotsquared.core.configuration.ConfigurationUtil; @@ -46,7 +47,7 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld { public int ROAD_HEIGHT = 62; public int PLOT_HEIGHT = 62; public int WALL_HEIGHT = 62; - public int MIN_GEN_HEIGHT = 0; + public int MIN_GEN_HEIGHT = PlotSquared.platform().versionMinHeight(); public BlockBucket MAIN_BLOCK = new BlockBucket(BlockTypes.STONE); public BlockBucket TOP_BLOCK = new BlockBucket(BlockTypes.GRASS_BLOCK); public BlockBucket WALL_BLOCK = new BlockBucket(BlockTypes.STONE_SLAB); diff --git a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java index 71e38cb76..8a0d98dce 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotWorld.java @@ -79,6 +79,7 @@ public class HybridPlotWorld extends ClassicPlotWorld { public int SCHEM_Y; private Location SIGN_LOCATION; private File root = null; + private int lastOverlayHeightError = Integer.MIN_VALUE; @Inject private SchematicHandler schematicHandler; @@ -262,9 +263,9 @@ public class HybridPlotWorld extends ClassicPlotWorld { if (schematic3 != null) { if (schematic3.getClipboard().getDimensions().getY() == worldHeight) { - SCHEM_Y = plotY = getMinGenHeight(); + SCHEM_Y = plotY = 0; } else if (!Settings.Schematics.PASTE_ON_TOP) { - SCHEM_Y = plotY = getMinBuildHeight(); + SCHEM_Y = plotY = getMinBuildHeight() - getMinGenHeight(); } } @@ -430,7 +431,10 @@ public class HybridPlotWorld extends ClassicPlotWorld { int pair = MathMan.pair(x, z); BaseBlock[] existing = this.G_SCH.computeIfAbsent(pair, k -> new BaseBlock[height]); if (y >= height) { - LOGGER.error("Error adding overlay block. `y > height`"); + if (y != lastOverlayHeightError) { + lastOverlayHeightError = y; + LOGGER.error(String.format("Error adding overlay block. `y > height`. y=%s, height=%s", y, height)); + } return; } existing[y] = id;