Give a more useful error if the biome color png files can't be found
This commit is contained in:
6
chunk.py
6
chunk.py
@@ -170,6 +170,12 @@ class ChunkRenderer(object):
|
||||
_, dir1 = os.path.split(moredirs)
|
||||
self.cachedir = os.path.join(cachedir, dir1, dir2)
|
||||
|
||||
|
||||
if self.world.useBiomeData:
|
||||
if not textures.grasscolor or not textures.foliagecolor:
|
||||
raise Exception("Can't find grasscolor.png or foliagecolor.png")
|
||||
|
||||
|
||||
if not os.path.exists(self.cachedir):
|
||||
try:
|
||||
os.makedirs(self.cachedir)
|
||||
|
||||
@@ -564,7 +564,8 @@ try:
|
||||
grasscolor = list(Image.open(_find_file("grasscolor.png")).getdata())
|
||||
foliagecolor = list(Image.open(_find_file("foliagecolor.png")).getdata())
|
||||
except:
|
||||
pass
|
||||
grasscolor = None
|
||||
foliagecolor = None
|
||||
|
||||
currentBiomeFile = None
|
||||
currentBiomeData = None
|
||||
|
||||
Reference in New Issue
Block a user