from mcpi.minecraft import Minecraft from mcpi import block import random mc = Minecraft.create() x, y, z = mc.player.getPos() wolkleur = random.randrange(0,15) def huis(): #maak een kubus mc.setBlocks(x, y, z, x+6, y+3, z+6, block.WOOL.id, wolkleur) #vul de kubus met lucht blokken mc.setBlocks(x+1, y, z+1, x+5, y+2, z+5, block.AIR.id) #plaats de ramen mc.setBlocks(x+1, y, z, x+1, y+1, z, block.GLASS.id) mc.setBlocks(x+1, y+2, z, x+1, y+2, z, block.GLASS.id) mc.setBlocks(x+5, y, z, x+5, y+1, z, block.GLASS.id) mc.setBlocks(x+5, y+2, z, x+5, y+2, z, block.GLASS.id) mc.setBlocks(x, y+1, z+1, x, y+2, z+2, block.GLASS.id) mc.setBlocks(x, y+1, z+4, x, y+2, z+5, block.GLASS.id) mc.setBlocks(x+1, y+1, z+6, x+2, y+2, z+6, block.GLASS.id) mc.setBlocks(x+4, y+1, z+6, x+5, y+2, z+6, block.GLASS.id) mc.setBlocks(x+6, y+1, z+1, x+6, y+2, z+2, block.GLASS.id) mc.setBlocks(x+6, y+1, z+4, x+6, y+2, z+5, block.GLASS.id) #opening voor de deur mc.setBlocks(x+3, y, z, x+3, y+1, z, block.AIR.id) for i in range(5): huis() y = y + 4 wolkleur = random.randrange(0,15)