Search This Blog

Sunday, August 28, 2016

A Cool house for the village

I wanted to throw up a sample of one of the student houses in the PyCraft neighborhood.
This will work on the raspberry pi but you may need to change some of the block id's around.


Now this is a work in progress. But you get the idea with this script.










# Import Minecraft libraries
import mcpi.minecraft as minecraft
#import building
import mcpi.block as block   
from mc import *
import time
import random
mc = minecraft.Minecraft.create()
x,y,z = mc.player.getPos()
mc.setBlocks(x-19,y,z-19,x+19,y+10,z+19,0)#wipe
mc.setBlocks(x-19,y-1,z-19,x+19,y-1,z+19,2)#yard

mc.setBlocks(x-8,y-1,z-8,x+8,y-1,z+8,43)#floor


mc.setBlocks(x-4,y,z-4,x+4,y+4,z-4,95,12)#glass wall
mc.setBlocks(x-4,y,z+4,x+4,y+4,z+4,95,12)#glass wall
mc.setBlocks(x-4,y,z+4,x-4,y+4,z-4,95,12)#glass wall
mc.setBlocks(x+4,y,z+4,x+4,y+4,z-4,95,12)#glass wall

mc.setBlocks(x-4,y-1,z-4,x-4,y+4,z-4,5,5)#pillar
mc.setBlocks(x+4,y-1,z+4,x+4,y+4,z+4,5,5)#pillar
mc.setBlocks(x+4,y-1,z-4,x+4,y+4,z-4,5,5)#pillar
mc.setBlocks(x-4,y-1,z+4,x-4,y+4,z+4,5,5)#pillar
mc.setBlocks(x-8,y+5,z-8,x+8,y+5,z+8,159,7)#ceiling


mc.setBlocks(x-8,y+6,z-8,x+8,y+6,z-8,159,8)#secondFloorClayBottom
mc.setBlocks(x-8,y+6,z+8,x+8,y+6,z+8,159,8)#secondFloorClayBottom
mc.setBlocks(x+8,y+6,z-8,x+8,y+6,z+8,159,8)#secondFloorClayBottom
mc.setBlocks(x-8,y+6,z+8,x-8,y+6,z-8,159,8)#secondFloorClayBottom


mc.setBlocks(x-8,y+7,z-8,x+8,y+10,z-8,5)#secondFloor wall
mc.setBlocks(x-8,y+7,z+8,x+8,y+10,z+8,5)#secondFloor wall
mc.setBlocks(x+8,y+7,z-8,x+8,y+10,z+8,5)#secondFloor wall
mc.setBlocks(x-8,y+7,z+8,x-8,y+10,z-8,5)#secondFloor wall

mc.setBlocks(x-8,y+7,z-8,x+8,y+9,z-8,20)#secondFloor window
mc.setBlocks(x-8,y+7,z+8,x+8,y+9,z+8,20)#secondFloor window
mc.setBlocks(x+8,y+7,z-8,x+8,y+9,z+8,20)#secondFloor window
mc.setBlocks(x-8,y+7,z+8,x-8,y+9,z-8,20)#secondFloor window

mc.setBlocks(x-10,y+10,z-10,x+10,y+10,z+10,159,7)#ceiling/roof 1
mc.setBlocks(x-8,y+11,z-8,x+8,y+11,z+8,159,7)#ceiling/roof 2
mc.setBlocks(x-7,y+12,z-7,x+7,y+12,z+7,159,7)#ceiling/roof 3

#########Lower Level Light Fixtures########
mc.setBlock(x+8,y+4,z+8,188,)#light post
mc.setBlock(x+8,y+3,z+8,169,)#light
mc.setBlock(x-8,y+4,z-8,188,)#light post
mc.setBlock(x-8,y+3,z-8,169,)#light
mc.setBlock(x+8,y+4,z-8,188,)#light post
mc.setBlock(x+8,y+3,z-8,169,)#light
mc.setBlock(x-8,y+4,z+8,188,)#light post
mc.setBlock(x-8,y+3,z+8,169,)#light

#########Upper Level Light Fixtures########
mc.setBlock(x+10,y+9,z+10,188,)#light post
mc.setBlock(x+10,y+8,z+10,169,)#light
mc.setBlock(x-10,y+9,z-10,188,)#light post
mc.setBlock(x-10,y+8,z-10,169,)#light
mc.setBlock(x+10,y+9,z-10,188,)#light post
mc.setBlock(x+10,y+8,z-10,169,)#light
mc.setBlock(x-10,y+9,z+10,188,)#light post
mc.setBlock(x-10,y+8,z+10,169,)#light
#MOVEDmc.setBlock(x+1,y,z+19,198)#endRod
#MOVEDmc.setBlock(x-1,y,z+19,198)#endRod


###Chorus Plant and end stone#####
#mc.setBlock(x+1,y-1,z+18,121)#end stone
mc.setBlocks(x+1,y,z+9,x+1,y,z+18,18)#fenceWalkway
mc.setBlocks(x-1,y,z+9,x-1,y,z+18,18)#fenceWalkway
mc.setBlocks(x-19,y,z-19,x-19,y,z+19,85)#leftFenceYard
mc.setBlocks(x+19,y,z-19,x+19,y,z+19,85)#rightFenceYard
mc.setBlocks(x+19,y,z-19,x-19,y,z-19,85)#backFenceYard
mc.setBlocks(x+19,y,z+19,x-19,y,z+19,85)#frontFenceYard
mc.setBlock(x+2,y,z+18,85)
mc.setBlock(x-2,y,z+18,85)
#chorus plant = 199
mc.setBlock(x+1,y,z+19,198)#endRod
mc.setBlock(x-1,y,z+19,198)#endRod

mc.setBlocks(x,y,z,x,y+1,z+20,0)#door

mc.setBlocks(x,y-1,z,x,y-2,z+20,43)#walkway

mc.setBlock(x,y-1,z,1,4)#Center Pointt


####STAIRS######
mc.setBlock(x-2,y,z-2,44,7)
mc.setBlock(x-2,y,z-3,44,7)
mc.setBlock(x-3,y,z-3,44,7)
mc.setBlock(x-3,y+1,z-2,44,7)
mc.setBlock(x-3,y+2,z-1,44,7)
mc.setBlock(x-3,y+3,z,44,7)
mc.setBlock(x-3,y+4,z+1,44,7)
mc.setBlock(x-3,y+5,z+2,44,7)
mc.setBlock(x-3,y+5,z+1,0)
mc.setBlock(x-3,y+5,z,0)
mc.setBlock(x-3,y+5,z-1,0)



No comments:

Post a Comment