From 86149224d1bfd69ae71edbfc32590cd421a19b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Thu, 9 Apr 2020 13:06:45 +0200 Subject: [PATCH] Don't set walls, wall filling or outline in plots using full vanilla terrain generation --- .../plot/generator/ClassicPlotManager.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java index 63615956e..780ae14ae 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotManager.java @@ -5,6 +5,7 @@ import com.github.intellectualsites.plotsquared.plot.object.BlockBucket; import com.github.intellectualsites.plotsquared.plot.object.Direction; import com.github.intellectualsites.plotsquared.plot.object.Location; import com.github.intellectualsites.plotsquared.plot.object.Plot; +import com.github.intellectualsites.plotsquared.plot.object.PlotAreaTerrainType; import com.github.intellectualsites.plotsquared.plot.object.PlotId; import com.github.intellectualsites.plotsquared.plot.util.MathMan; import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue; @@ -150,6 +151,12 @@ public class ClassicPlotManager extends SquarePlotManager { if (classicPlotWorld.ROAD_WIDTH == 0) { return false; } + // When using full vanilla generation, don't generate the walls + if (classicPlotWorld.getTerrain() == PlotAreaTerrainType.ALL) { + // Return true because the method actually did what it's intended to in this case, + // which is absolutely nothing + return true; + } Plot plot = classicPlotWorld.getPlotAbs(plotId); Location bottom = plot.getBottomAbs(); Location top = plot.getExtendedTopAbs(); @@ -206,6 +213,12 @@ public class ClassicPlotManager extends SquarePlotManager { if (classicPlotWorld.ROAD_WIDTH == 0) { return false; } + // When using full vanilla generation, don't generate the walls + if (classicPlotWorld.getTerrain() == PlotAreaTerrainType.ALL) { + // Return true because the method actually did what it's intended to in this case, + // which is absolutely nothing + return true; + } Plot plot = classicPlotWorld.getPlotAbs(plotId); Location bot = plot.getExtendedBottomAbs() .subtract(plot.getMerged(Direction.WEST) ? 0 : 1, 0, @@ -253,6 +266,12 @@ public class ClassicPlotManager extends SquarePlotManager { if (classicPlotWorld.ROAD_WIDTH == 0) { return false; } + // When using full vanilla generation, don't generate the walls + if (classicPlotWorld.getTerrain() == PlotAreaTerrainType.ALL) { + // Return true because the method actually did what it's intended to in this case, + // which is absolutely nothing + return true; + } Plot plot = classicPlotWorld.getPlotAbs(plotId); Location bot = plot.getExtendedBottomAbs() .subtract(plot.getMerged(Direction.WEST) ? 0 : 1, 0,