From ee699a16749c21c59fd6aafe34606142d12e07e5 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Thu, 1 Oct 2015 00:01:13 -1000 Subject: [PATCH] WorldEditor.importSchematic[Iter] now accepts either a schematic or a dimension --- src/mceditlib/worldeditor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mceditlib/worldeditor.py b/src/mceditlib/worldeditor.py index 61f1aa7..7bf796b 100644 --- a/src/mceditlib/worldeditor.py +++ b/src/mceditlib/worldeditor.py @@ -815,7 +815,11 @@ class WorldEditorDimension(object): return exhaust(self.exportSchematicIter(selection)) def importSchematicIter(self, schematic, destPoint): - dim = schematic.getDimension() + if hasattr(schematic, 'getDimension'): + # accept either WorldEditor or WorldEditorDimension + dim = schematic.getDimension() + else: + dim = schematic return copyBlocksIter(self, dim, dim.bounds, destPoint, biomes=True, create=True) def importSchematic(self, schematic, destPoint):