From b366b0d261c6508858f3d5c5b0543d673767ebca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Thu, 30 May 2019 13:22:21 +0200 Subject: [PATCH] Set unspecified blocks from the schematic to air If this isn't done, any blocks not specified in the schematic will remain after a clear, which is obviously undesirable. --- .../plotsquared/plot/generator/HybridPlotManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java index 93713ec9c..0155f9cec 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/HybridPlotManager.java @@ -11,7 +11,7 @@ import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue; import com.google.common.collect.Sets; import com.sk89q.worldedit.world.block.BaseBlock; - +import com.sk89q.worldedit.world.block.BlockTypes; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -96,6 +96,9 @@ public class HybridPlotManager extends ClassicPlotManager { for (int y = 0; y < blocks.length; y++) { if (blocks[y] != null) { queue.setBlock(x, minY + y, z, blocks[y]); + } else { + // This is necessary, otherwise any blocks not specified in the schematic will remain after a clear + queue.setBlock(x, minY + y, z, BlockTypes.AIR.getDefaultState().toBaseBlock()); } } }