Last active
December 16, 2015 09:59
-
-
Save cbscribe/5417197 to your computer and use it in GitHub Desktop.
erase everything above sea level
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#written by Hiradur | |
#Replaces any block above sea level with air | |
#too keep processing time short it only replaces blocks from above sea level to level 64 | |
#if you built higher you have to change the parameter | |
#import minecraft.py module for interaction with the world | |
import minecraft.minecraft as minecraft | |
#import minecraft block module for block ids | |
import minecraft.block as block | |
#import time for delays | |
import time | |
if __name__ == "__main__": | |
#Connect to minecraft by creating a minecraft object | |
#(remember: minecraft needs to be running and in a game) | |
mc = minecraft.Minecraft.create() | |
mc.postToChat("terraforming... this will take a few seconds...") | |
mc.postToChat("minecraft will probably be unresponsive for this time.") | |
mc.postToChat("If you dont want your world to be erased you have 2 seconds to close the executing terminal.") | |
time.sleep(2) | |
mc.postToChat("Starting...") | |
time.sleep(1) | |
#Replace blocks above sea level with air blocks by creating a huge cuboid | |
#change fifth parameter to your heighest level | |
mc.setBlocks(-128, 0, -128, 128, 63, 128, block.AIR) | |
mc.postToChat("done!") | |
time.sleep(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment