Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pymclevel import MCSchematic
- from pymclevel import TileEntity
- from pymclevel import TAG_Compound
- from pymclevel import TAG_Short
- from pymclevel import TAG_Byte
- from pymclevel import TAG_String
- import random
- displayName = "Inverse Replace"
- inputs = (
- ("Fill with", "blocktype"),
- ("Leave", "blocktype"),
- )
- def perform(level, box, options):
- mat1 = options["Fill with"]
- mat2 = options["Leave"]
- for (chunk, slices, point) in level.getChunkSlices(box):
- blocks = chunk.Blocks[slices]
- blocks[blocks != mat2.ID] = mat1.ID
- chunk.chunkChanged()
- def randomGen():
- return int(random.random() * 99) + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement