Load block mapping only after all attempts at loading/creating metadataTag
This commit is contained in:
parent
feb325232e
commit
9ec45459c7
@ -527,7 +527,6 @@ class AnvilWorldAdapter(object):
|
||||
try:
|
||||
metadataTag = nbt.load(buf=self.selectedRevision.readFile("level.dat"))
|
||||
self.metadata = AnvilWorldMetadata(metadataTag)
|
||||
self.loadBlockMapping()
|
||||
except (EnvironmentError, zlib.error, NBTFormatError) as e:
|
||||
log.info("Error loading level.dat, trying level.dat_old ({0})".format(e))
|
||||
try:
|
||||
@ -543,6 +542,8 @@ class AnvilWorldAdapter(object):
|
||||
if self.metadata.version != VERSION_ANVIL:
|
||||
raise LevelFormatError("Pre-Anvil world formats are not supported (for now)")
|
||||
|
||||
self.loadBlockMapping()
|
||||
|
||||
def loadBlockMapping(self):
|
||||
if self.metadata.is1_8World():
|
||||
itemStackVersion = VERSION_1_8
|
||||
|
Reference in New Issue
Block a user