Fix findTrueSpawn for spawn in y = 128
This commit is contained in:
6
world.py
6
world.py
@@ -220,9 +220,11 @@ class WorldRenderer(object):
|
|||||||
inChunkZ = spawnZ - (chunkY*16)
|
inChunkZ = spawnZ - (chunkY*16)
|
||||||
|
|
||||||
## find the first air block
|
## find the first air block
|
||||||
while (blockArray[inChunkX, inChunkZ, spawnY] != 0):
|
while (blockArray[inChunkX, inChunkZ, spawnY] != 0 and spawnY != 127):
|
||||||
spawnY += 1
|
spawnY += 1
|
||||||
|
|
||||||
|
if spawnY == 127 and blockArray[inChunkX, inChunkZ, spawnY] != 0 :
|
||||||
|
spawnY = 128 # get the right spawnY coordinate for markers.js
|
||||||
|
|
||||||
self.POI.append( dict(x=spawnX, y=spawnY, z=spawnZ,
|
self.POI.append( dict(x=spawnX, y=spawnY, z=spawnZ,
|
||||||
msg="Spawn", type="spawn", chunk=(inChunkX,inChunkZ)))
|
msg="Spawn", type="spawn", chunk=(inChunkX,inChunkZ)))
|
||||||
|
|||||||
Reference in New Issue
Block a user