Big Robot Games - Indie Dev Blog Edition

Somewhere for me to post my musings on Indie Development, Cryptocurrencies and whatever else strikes my fancy.

Playing with Minecraft-Pi

Spent a little time with Minecraft-Pi recently, running on Raspbian on a B board.  Creating a house becomes super easy when you can do it programmatically.  The following code will create a hollow stone cube (10x10x10) directly in front of you.

In Python 2.7.3
from mcpi import minecraft
mc = minecraft.Minecraft.create()
x, y, z = mc.player.getPos()
stone = 1
air = 0
mc.setBlocks(x+1, y+1, z+1, x+11, y+11, z+11, stone)
mc.setBlocks(x+2, y+2, z+2, x+9, y+9, z+9, air)