0

fixed crash when SpawnY wasn't in [0, 128)

This commit is contained in:
Aaron Griffith
2011-10-30 18:06:28 -04:00
parent 3917259e33
commit 64e67cc827

View File

@@ -266,7 +266,13 @@ class World(object):
## The chunk that holds the spawn location
chunkX = spawnX/16
chunkY = spawnZ/16
## clamp spawnY to a sane value, in-chunk value
if spawnY < 0:
spawnY = 0
if spawnY > 127:
spawnY = 127
try:
## The filename of this chunk
chunkFile = self.get_region_path(chunkX, chunkY)