From 23b7e90c54329a714f9823b66b0b365ad2050b5d Mon Sep 17 00:00:00 2001 From: Alejandro Aguilera Date: Wed, 5 Jan 2011 02:38:57 +0100 Subject: [PATCH] Fix findTrueSpawn for spawn in y = 128 --- world.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/world.py b/world.py index 7ae08b0..4de2a7a 100644 --- a/world.py +++ b/world.py @@ -220,9 +220,11 @@ class WorldRenderer(object): inChunkZ = spawnZ - (chunkY*16) ## find the first air block - while (blockArray[inChunkX, inChunkZ, spawnY] != 0): + while (blockArray[inChunkX, inChunkZ, spawnY] != 0 and spawnY != 127): 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, msg="Spawn", type="spawn", chunk=(inChunkX,inChunkZ)))