Hardware Reference
In-Depth Information
Further Adventures with
Minecraft Pi
Minecraft Pi allows you to be really creative. As well as inding programs created by
other people, you can ind online tutorials to generate things like rainbows, bridges
and other games like Snake inside your Minecraft world. Here's a list to get you started:
Make a colourful rainbow with this tutorial: www.minecraftforum.net/
topic/1638036-my-first-script-for-minecraft-pi-api-a-
rainbow
You can't go wrong following Martin O'Hanlon's Minecraft Pi tutorials on his
website,
Stuf about=“code” : www.stuffaboutcode.com/p/minecraft.
html
Advance your programming skills using Craig Richardson 's Python Minecraft Pi
Book ( http://arghbox.files.wordpress.com/2013/06/minecraft
book.pdf ) and API cheat sheet ( http://arghbox.files.wordpress.
com/2013/06/table.pdf )
Minecraft Pi Command Quick Reference Table
Command
Description
cd mcpi
Changes directory to mcpi.
import mcpi.minecraft as minecraft
Imports the Minecraft modules.
mc = minecraft.Minecraft.create()
Connects to Minecraft Pi by creating the
Minecraft object.
./minecraft-pi
Opens Minecraft Pi from the LXTerminal or
command line.
Returns the players position with loats.
pos = mc.player.getPos()
Returns the players position with integers.
pos = mc.player.getTilePos()
Posts a message to chat in Minecraft Pi.
postToChat(msg)
setBlock
Sets a block at coordinates.
setBlocks
Sets blocks between two sets of coordi-
nates.
setPos
Sets the position of a player.
Used to get content, such as an archive ile
( .tar ) from a web server where it is stored.
wget
 
Search WWH ::




Custom Search