Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import mclevel
- import os;
- worldFile = "../saves/World4"
- world = mclevel.fromFile(worldFile)
- def removeChunk(xPos, zPos):
- global world
- if world.containsChunk(xPos, zPos):
- aChunk = world.getChunk(xPos, zPos)
- os.remove(aChunk.filename)
- world.saveInPlace()
- return
- def createNullChunk(xPos, zPos):
- global world
- if not world.containsChunk(xPos, zPos):
- aChunk = mclevel.InfdevChunk(world, [xPos, zPos], True)
- aChunk.chunkChanged()
- world.saveInPlace()
- world = mclevel.fromFile(worldFile)
- aChunk = world.getChunk(xPos, zPos)
- aChunk.Blocks[:,:,0] = world.materials.materialNamed("Adminium")
- aChunk.Blocks[:,:,1:] = 0
- aChunk.chunkChanged()
- world.generateLights()
- #Save and reload to pick up changes (required to save at some stage!)
- world.saveInPlace()
- world = mclevel.fromFile(worldFile)
- return
- removeChunk(-18, 21)
- createNullChunk(-18, 21)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement