Fix both a negative x and z coordinate not being possible

This commit is contained in:
Phoenix616 2020-05-14 16:55:39 +01:00
parent 0c35fe9bb9
commit 24c0864ff8
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ public class RandomSearcher {
randChunkX = (random.nextBoolean() ? 1 : -1) * random.nextInt(maxChunk + 1);
randChunkZ = (random.nextBoolean() ? 1 : -1) * random.nextInt(maxChunk + 1);
}
} while (!checked.put(randChunkX, randChunkZ) || !inRadius(randChunkX, randChunkZ, minChunk, maxChunk));
} while (!checked.put(randChunkX, randChunkZ) || !inRadius(Math.abs(randChunkX), Math.abs(randChunkZ), minChunk, maxChunk));
randomLoc.setX(((center.getBlockX() >> 4) + randChunkX) * 16);
randomLoc.setZ(((center.getBlockZ() >> 4) + randChunkZ) * 16);