Fix rare bug where if the plot size was less than 15 and the chunk contained an entire plot, it would generate incorrectly

This commit is contained in:
dordsor21 2020-05-01 20:30:59 +01:00
parent 36948ed351
commit ed2e9a80ed

View File

@ -110,7 +110,7 @@ public class HybridGen extends IndependentPlotGenerator {
boolean[] insideWallX = new boolean[16]; boolean[] insideWallX = new boolean[16];
for (short i = 0; i < 16; i++) { for (short i = 0; i < 16; i++) {
short v = (short) (relativeOffsetX + i); short v = (short) (relativeOffsetX + i);
if (v >= hybridPlotWorld.SIZE) { while (v >= hybridPlotWorld.SIZE) {
v -= hybridPlotWorld.SIZE; v -= hybridPlotWorld.SIZE;
} }
relativeX[i] = v; relativeX[i] = v;
@ -131,7 +131,7 @@ public class HybridGen extends IndependentPlotGenerator {
boolean[] insideWallZ = new boolean[16]; boolean[] insideWallZ = new boolean[16];
for (short i = 0; i < 16; i++) { for (short i = 0; i < 16; i++) {
short v = (short) (relativeOffsetZ + i); short v = (short) (relativeOffsetZ + i);
if (v >= hybridPlotWorld.SIZE) { while (v >= hybridPlotWorld.SIZE) {
v -= hybridPlotWorld.SIZE; v -= hybridPlotWorld.SIZE;
} }
relativeZ[i] = v; relativeZ[i] = v;