Test: copyBlocksFrom no longer fails if the requested box is partially out of the source level's bounds.
It should just copy the area within the requested box.
This commit is contained in:
parent
459b20863d
commit
b0ef494546
@ -22,10 +22,6 @@ class TestSchematics(unittest.TestCase):
|
||||
schematic = MCSchematic(shape=size, filename=temp, mats='Classic')
|
||||
level = self.indevLevel.level
|
||||
|
||||
self.failUnlessRaises(ValueError, lambda: (
|
||||
schematic.copyBlocksFrom(level, BoundingBox((-32, -32, -32), (64, 64, 64,)), (0, 0, 0))
|
||||
))
|
||||
|
||||
schematic.copyBlocksFrom(level, BoundingBox((0, 0, 0), (64, 64, 64,)), (0, 0, 0))
|
||||
assert((schematic.Blocks[0:64, 0:64, 0:64] == level.Blocks[0:64, 0:64, 0:64]).all())
|
||||
|
||||
|
Reference in New Issue
Block a user