create Materials tag if it isn't present (old schematics)

This commit is contained in:
David Vierra 2011-03-11 20:51:25 -10:00
parent 1517d39f86
commit d6a66b2ba8

View File

@ -1407,6 +1407,8 @@ class MCSchematic (MCLevel):
@Materials.setter
@decompress_first
def Materials(self, val):
if not Materials in self.root_tag:
self.root_tag[Materials] = TAG_String()
self.root_tag[Materials].value = val
@classmethod