mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-22 02:25:38 +01:00
Fix both a negative x and z coordinate not being possible
This commit is contained in:
parent
0c35fe9bb9
commit
24c0864ff8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user