Created
May 26, 2013 22:06
-
-
Save cbscribe/5654168 to your computer and use it in GitHub Desktop.
Explode a TNT block
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
import minecraft | |
import time | |
mc = minecraft.Minecraft.create(); | |
while True: | |
hits = mc.events.pollBlockHits() | |
for hit in hits: | |
block = mc.getBlockWithData(hit.pos.x, hit.pos.y, hit.pos.z); | |
block.data = (block.data + 1) & 0xf; | |
mc.setBlock(hit.pos.x, hit.pos.y, hit.pos.z, block.id, block.data) | |
mc.postToChat("Block data is now " + str(block.data)) | |
time.sleep(0.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment