Minecraft Pi Edition

40 views
Skip to first unread message

Matt Johnston

unread,
Feb 26, 2013, 6:27:01 AM2/26/13
to coderdoj...@googlegroups.com
First off, some basics.

cd /home/pi/mcpi

cd /home/pi/mcpi/api/Python/mcpi

python

import minecraft as minecraft

then python shows >>>

To connect with the new API:

mc = minecraft.Minecraft.create()

mc.postToChat("Hey, hey, hey, hey, hey")

mc.postToChat("Hey, beautiful day")

mc = minecraft.Minecraft.create()

mc.setBlock(0,0,0,46)

mc.setBlocks(0,0,0,10,10,10,3)

This creates a block at position 0,0,0, with dimensions 10x10x10 made out of "3" which in the Minecraft ID list is "dirt". You can modify the materials (0 is Air, 1 is Stone, 17 is wood, 8 is water, 20 is glass)

Reply all
Reply to author
Forward
0 new messages