From 28e7f5bc082ca8c3bce6150941a7cdaa6050cc60 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 30 Nov 2016 15:57:24 +1100 Subject: [PATCH] Fixes #1349 Non standard plot managers/areas not supported --- .../com/intellectualcrafters/plot/object/Plot.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java index b0ce0f109..fea6c4349 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -12,6 +12,7 @@ import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.flag.Flags; +import com.intellectualcrafters.plot.generator.SquarePlotWorld; import com.intellectualcrafters.plot.util.BO3Handler; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.EventUtil; @@ -816,6 +817,12 @@ public class Plot { */ public void setBiome(final String biome, final Runnable whenDone) { final ArrayDeque regions = new ArrayDeque<>(this.getRegions()); + final int extendBiome; + if (area instanceof SquarePlotWorld) { + extendBiome = (((SquarePlotWorld) area).ROAD_WIDTH > 0) ? 1 : 0; + } else { + extendBiome = 0; + } Runnable run = new Runnable() { @Override public void run() { @@ -825,8 +832,8 @@ public class Plot { return; } RegionWrapper region = regions.poll(); - Location pos1 = new Location(Plot.this.area.worldname, region.minX, region.minY, region.minZ); - Location pos2 = new Location(Plot.this.area.worldname, region.maxX, region.maxY, region.maxZ); + Location pos1 = new Location(Plot.this.area.worldname, region.minX - extendBiome, region.minY, region.minZ - extendBiome); + Location pos2 = new Location(Plot.this.area.worldname, region.maxX + extendBiome, region.maxY, region.maxZ + extendBiome); ChunkManager.chunkTask(pos1, pos2, new RunnableVal() { @Override public void run(int[] value) {