Here are some steps to get the TNT to work in Minecraft Pi edition.
- Copy the following code block into a file called “tnt.py”. Save the file anywhere you want
- Start Minecraft pi edition and enter an environment instance.
- Start lxTerm or whatever terminal program you like to use
- cd to the directory where you saved the tnt.py file.
- execute ‘chmod 777 tnt.py’ to change the file runnable permissions.
- execute ‘python ./tnt.py’.
- switch back to minecraft
- place a block of TNT
- right-click on the block
- your console should report something like “block data is now 1”
- left click the block with your pick 1 time.
- big badaboom.
mc = mcpi.minecraft.Minecraft.create();
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))
Have a Samsung galaxy-family android phone that seems to permanently have the “storage space running out” message?
Here are 2 ways you can fix it.
The first way is to dial *#9900#, and hit call. This *may* start an application that has a button that says “Delete dumpstate/logcat”. Click that button and it should wipe the log directory stored on the internal file system in the system partition. Your storage space running out message should disappear and you should be able to install updates again as a free person should.
The second way, if *#9900# does not work or says “invalid mmi code”, requires you to root your phone. I won’t go into that as there are plenty of tutorials on google, which typically are specific your phone. Once you have root, use a file system explorer as root to delete the contents of the system directory “/data/logs/”. In my case, there were hundreds of 1MB files that seemed to just be log files filling up the precious system storage partition. Once the contents of the directory were deleted, the message went away.