Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Filter made by Purple_
- # http://www.youtube.com/ThatPurplePlant
- from pymclevel import TAG_List
- from pymclevel import TAG_Byte
- from pymclevel import TAG_Int
- from pymclevel import TAG_Compound
- from pymclevel import TAG_Short
- from pymclevel import TAG_Double
- from pymclevel import TAG_Float
- from pymclevel import TAG_String
- from pymclevel import TAG_Long
- from pymclevel import TAG_Int_Array
- from numpy import zeros
- # piano: air (0), Grass (2), Dirt (3), Leaves (18), sponge (19), wool (35)
- # double bass: wooden planks (5), wood (17), note block (25), bookshelf (47)
- # bass drum: stone (1), cobblestone (4), adminium (7), gold ore (14), iron ore (15), coal ore (16) lapis ore (21), lapis block (22), sandstone (24), moss stone (48), obsidian (49), redstone ore (73), netherrack (87), glowstone block (89)
- # snare drum: sand (12), gravel (13), clay block (82), soul sand (88)
- # click: glass (20)
- displayName = "Note Blocks to Command Blocks"
- inputs = (
- ("Filter by Purple_","label"),
- ("youtube.com/ThatPurplePlant","label"),
- ("Selector", ("string", "value=@a[]")),
- ("Volume",(1,1,100000000)),
- ("Volume is the amount of blocks the sound will be heard from the given player. Increasing the value will increase the heard distance by 16 blocks.","label"),
- )
- def perform(level, box, options):
- for x in range(box.minx, box.maxx):
- for y in range(box.miny, box.maxy):
- for z in range(box.minz, box.maxz):
- if level.blockAt(x, y, z) == 25:
- ConvertNoteBlocksToCommandBlocks(level, x, y, z)
- def ConvertNoteBlocksToCommandBlocks(level, x, y, z):
- BlockIdUnder = level.blockAt(x, y-1, z)
- level.setBlockAt(x, y, z, 137)
- control = TAG_Compound()
- chunk = level.getChunk(x / 16, z / 16)
- chunk.TileEntities.append(control)
- chunk.dirty = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement