Fix up the RTP.
This commit is contained in:
parent
aa4cd9b0b9
commit
d823444dc9
1 changed files with 2 additions and 2 deletions
|
@ -86,13 +86,13 @@ public class RTPContainer {
|
||||||
Random rng = new Random(Instant.now().getEpochSecond());
|
Random rng = new Random(Instant.now().getEpochSecond());
|
||||||
Vector3 pos = new Vector3(rng.nextDouble(0xFFFF), 0, rng.nextDouble(0xFFFF));
|
Vector3 pos = new Vector3(rng.nextDouble(0xFFFF), 0, rng.nextDouble(0xFFFF));
|
||||||
BlockPos bpos = pos.asBlockPos();
|
BlockPos bpos = pos.asBlockPos();
|
||||||
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SURFACE);
|
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SPAWN);
|
||||||
pos = new Vector3(
|
pos = new Vector3(
|
||||||
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
||||||
while (!container.Dimension.getWorldBorder().isWithinBounds(pos.asBlockPos())) {
|
while (!container.Dimension.getWorldBorder().isWithinBounds(pos.asBlockPos())) {
|
||||||
pos = new Vector3(rng.nextDouble(0xffff), 0, rng.nextDouble(0xffff));
|
pos = new Vector3(rng.nextDouble(0xffff), 0, rng.nextDouble(0xffff));
|
||||||
bpos = pos.asBlockPos();
|
bpos = pos.asBlockPos();
|
||||||
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SURFACE);
|
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SPAWN);
|
||||||
pos = new Vector3(
|
pos = new Vector3(
|
||||||
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue