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
- from pymclevel import TAG_Int
- from pymclevel import TAG_List
- from numpy import zeros
- displayName = "Empty chests"
- def perform(level, box, options):
- minx = int(box.minx/16)*16
- minz = int(box.minz/16)*16
- for x in xrange(minx, box.maxx, 16):
- for z in xrange(minz, box.maxz, 16):
- chunk = level.getChunk(x / 16, z / 16)
- for te in chunk.TileEntities:
- px = te["x"].value
- py = te["y"].value
- pz = te["z"].value
- if px < box.minx or px >= box.maxx:
- continue
- if py < box.miny or py >= box.maxy:
- continue
- if pz < box.minz or pz >= box.maxz:
- continue
- if te["id"].value == "Chest":
- te["Items"] = []
- chunk.dirty = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement