House
Let's start with a cube:
# brick cube
cube(20,10,-20,10, 1)
This cube is actually empty inside. If you don't believe it, let's dig a hole on one wall to see:
# a piece of 'air' flat_xz
flat_xz(25, 10, -20, 10,5, 0)
(pic, emptyCube)
House
To make a house, we can start with a cube as the house body, then build windows and doors on the cube.
Check to make sure we already have functions door, window, cube
and all other functions needed.
# house
cube(1,1,-20, 30, 67) # light blue house
# front door and windows
door(13,9, 50) # red door
window(3,5,9,16,8, 62) # blue window
window(20,5,9,16,8, 62)
Add a door and window at the back side, also add a roof
# back door and window
door(20,-20,50)
window(3,5,-20, 20,14, 62)
# red roof
flat_xz(-1,31,-22,34,34,73)
(pic, house, 2,3)
We can design door steps for our little house:
# door steps
flat_xz(12,1,9,2,8, 2)
flat_xz(10,0,10, 5, 12, 2)
Let's try using the Photographer's flat and take another screenshot of our little house:
# photographer's flat:
print(game.get_player_position()) # (x:28 y:1 z:43)
flat_xz(28,5,43, 10,5,1)
game.set_player_position(Position(30,6,43))
(pic, house4)
I like my little house, I like to see some trees through the window.
Time to plant some trees.