fixed crash when SpawnY wasn't in [0, 128)
This commit is contained in:
@@ -267,6 +267,12 @@ class World(object):
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user