fixed crash when SpawnY wasn't in [0, 128)
This commit is contained in:
@@ -266,7 +266,13 @@ class World(object):
|
|||||||
## The chunk that holds the spawn location
|
## The chunk that holds the spawn location
|
||||||
chunkX = spawnX/16
|
chunkX = spawnX/16
|
||||||
chunkY = spawnZ/16
|
chunkY = spawnZ/16
|
||||||
|
|
||||||
|
## clamp spawnY to a sane value, in-chunk value
|
||||||
|
if spawnY < 0:
|
||||||
|
spawnY = 0
|
||||||
|
if spawnY > 127:
|
||||||
|
spawnY = 127
|
||||||
|
|
||||||
try:
|
try:
|
||||||
## The filename of this chunk
|
## The filename of this chunk
|
||||||
chunkFile = self.get_region_path(chunkX, chunkY)
|
chunkFile = self.get_region_path(chunkX, chunkY)
|
||||||
|
|||||||
Reference in New Issue
Block a user