Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def createTestBoard(self, anyBlock=True):
- if anyBlock:
- allBlocks = [self.editor.level.materials[a, b] for a in range(256) for b in range(16)]
- blockWidth = 64
- else:
- allBlocks = self.editor.level.materials.allBlocks
- blockWidth = 16
- blockCount = len(allBlocks)
- width = blockWidth * 3 + 1
- rows = blockCount // blockWidth + 1
- length = rows * 3 + 1
- height = 3
- schematic = pymclevel.MCSchematic((width, height, length), mats=self.editor.level.materials)
- schematic.Blocks[:, :, 0] = 1
- for i, block in enumerate(allBlocks):
- col = (i % blockWidth) * 3 + 1
- row = (i // blockWidth) * 3
- schematic.Blocks[col:col + 2, row:row + 2, 2] = block.ID
- schematic.Data[col:col + 2, row:row + 2, 2] = block.blockData
- return schematic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement