Handle missing 'variants' in blockstates json
json may have 'multipart' instead. Handle this!!
This commit is contained in:
parent
f32212b3f5
commit
75d229a2b1
@ -402,6 +402,10 @@ cdef class BlockModels(object):
|
|||||||
log.info("Could not get blockstates resource for %s#%s, skipping... (%r)", resourcePath, resourceVariant, e)
|
log.info("Could not get blockstates resource for %s#%s, skipping... (%r)", resourcePath, resourceVariant, e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if 'variants' not in statesJson:
|
||||||
|
log.warn("'variants' key not found in states file %s, skipping...", resourcePath)
|
||||||
|
return None
|
||||||
|
|
||||||
variants = statesJson['variants']
|
variants = statesJson['variants']
|
||||||
variantDict = variants[resourceVariant]
|
variantDict = variants[resourceVariant]
|
||||||
if isinstance(variantDict, list):
|
if isinstance(variantDict, list):
|
||||||
|
Reference in New Issue
Block a user