From ed2e9a80edad418b109454c6c7756eb0e43ec31c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 1 May 2020 20:30:59 +0100 Subject: [PATCH] Fix rare bug where if the plot size was less than 15 and the chunk contained an entire plot, it would generate incorrectly --- .../main/java/com/plotsquared/core/generator/HybridGen.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/generator/HybridGen.java b/Core/src/main/java/com/plotsquared/core/generator/HybridGen.java index f54c3a705..e661e4c5f 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/HybridGen.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridGen.java @@ -110,7 +110,7 @@ public class HybridGen extends IndependentPlotGenerator { boolean[] insideWallX = new boolean[16]; for (short i = 0; i < 16; i++) { short v = (short) (relativeOffsetX + i); - if (v >= hybridPlotWorld.SIZE) { + while (v >= hybridPlotWorld.SIZE) { v -= hybridPlotWorld.SIZE; } relativeX[i] = v; @@ -131,7 +131,7 @@ public class HybridGen extends IndependentPlotGenerator { boolean[] insideWallZ = new boolean[16]; for (short i = 0; i < 16; i++) { short v = (short) (relativeOffsetZ + i); - if (v >= hybridPlotWorld.SIZE) { + while (v >= hybridPlotWorld.SIZE) { v -= hybridPlotWorld.SIZE; } relativeZ[i] = v;