示例#1
0
    def __init__(self, *args, **kwargs):
        super(SmallHouseV2, self).__init__(*args, **kwargs)

        #######################################################################
        # build the roof
        layer_blocks = []
        # create the wall spans as wood for first layer of roof
        for pos1, pos2, desc in SmallHouseV2Base.WALL_SPANS:
            layer_blocks.append(
                BuildingBlock(pos1, block.WOOD, pos2, desc + " roof"))

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        # create inner span as wood for second layer of roof
        layer_blocks.append(
            BuildingBlock(SmallHouseV2Base.WALLS_CORNER_POS['South East'] +
                          Vec3(-1, 0, -1),
                          block.WOOD,
                          SmallHouseV2Base.WALLS_CORNER_POS['North West'] +
                          Vec3(1, 0, 1),
                          description="Roof inner"))

        self.add_layer(BuildingLayer(layer_blocks, 5))
        del layer_blocks[:]

        self._set_orientation()
示例#2
0
    def __init__(self, *args, **kwargs):
        super(LampPost, self).__init__(width=LampPost.WIDTH, *args, **kwargs)

        post = BuildingBlock(Building.SE_CORNER_POS + Vec3(-1, 0, -1),
                             block.FENCE,
                             description="Post")
        self.add_layer(BuildingLayer([post], 0))
        self.add_layer(BuildingLayer([post], 1))
        self.add_layer(BuildingLayer([post], 2))

        torches = [(Building.SE_CORNER_POS + Vec3(-2, 0, -1),
                    block.TORCH.withData(Torch.WEST), "West torch"),
                   (Building.SE_CORNER_POS + Vec3(-1, 0, -2),
                    block.TORCH.withData(Torch.NORTH), "North torch"),
                   (Building.SE_CORNER_POS + Vec3(0, 0, -1),
                    block.TORCH.withData(Torch.EAST), "East torch"),
                   (Building.SE_CORNER_POS + Vec3(-1, 0, 0),
                    block.TORCH.withData(Torch.SOUTH), "South torch")]

        wool_block = block.WOOL.withData(LampPost.BLACK_WOOL)
        lamp_blocks = []
        lamp_blocks.append(
            BuildingBlock(Building.SE_CORNER_POS + Vec3(-1, 0, -1),
                          wool_block,
                          description="Lamp block"))
        for pos, block_type, desc in torches:
            lamp_blocks.append(Torch(pos, block_type, description=desc))

        self.add_layer(BuildingLayer(lamp_blocks, 3))

        self._set_orientation()
示例#3
0
	def __init__(self, multiplier=1, *args, **kwargs):
		super(Street, self).__init__(width=Street.WIDTH, *args, **kwargs)
		self.multiplier = multiplier
				
		z_extent = (-3 * multiplier) + 1
		path = BuildingBlock(Building.SE_CORNER_POS, block.COBBLESTONE, 
								Building.SE_CORNER_POS + Vec3(-2,0,z_extent))
		self.add_layer(BuildingLayer([path], -2))

		path = BuildingBlock(Building.SE_CORNER_POS, block.GRAVEL, 
								Building.SE_CORNER_POS + Vec3(-2,0,z_extent))
		self.add_layer(BuildingLayer([path], -1))
		
		self._set_orientation()
示例#4
0
	def _create_singlepart_layer(self, orientation):
		WELL_CORE = (Vec3(-1,0,-2), Vec3(2,0,-5))
		WELL_BASE = []
		WELL_BASE.append(BuildingBlock(WELL_CORE[0], block.STONE, WELL_CORE[1]))
		sut = BuildingLayer(WELL_BASE, 0)
		sut = self._rotate_sut(sut, orientation)
		return sut
示例#5
0
    def __init__(self, *args, **kwargs):
        super(Well, self).__init__(width=Well.WIDTH, *args, **kwargs)

        # level -3, base
        base = []
        base.append(
            BuildingBlock(Well.WELL_CORE_POS[0],
                          block.COBBLESTONE,
                          Well.WELL_CORE_POS[1],
                          description="Well base"))
        self.add_layer(BuildingLayer(base, -3))

        # level -2, water
        water = []
        water.extend(base)
        water.append(
            BuildingBlock(Well.WELL_INNER_SPAN[0],
                          block.WATER,
                          Well.WELL_INNER_SPAN[1],
                          description="Well water"))

        self.add_layer(BuildingLayer(water, -2))

        layer_blocks = []
        # level -1, ground
        layer_blocks.append(
            BuildingBlock(Well.WELL_OUTER_SPAN[0],
                          block.GRAVEL,
                          Well.WELL_OUTER_SPAN[1],
                          description="Well ground surround"))
        layer_blocks.extend(water)

        self.add_layer(BuildingLayer(layer_blocks, -1))
        del layer_blocks[:]

        # level 0, walls
        layer_blocks.extend(base)
        layer_blocks.append(
            BuildingBlock(Well.WELL_INNER_SPAN[0],
                          block.AIR,
                          Well.WELL_INNER_SPAN[1],
                          description="Well clear inner"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        # levels 1 & 2, supports
        supports = []
        for pos in Well.WELL_CORE_POS:
            supports.append(
                BuildingBlock(pos, block.FENCE, description="Well support"))

        self.add_layer(BuildingLayer(supports, 1))
        self.add_layer(BuildingLayer(supports, 2))

        # level 3 roof
        base[0].description = "Well roof"
        self.add_layer(BuildingLayer(base, 3))

        self._set_orientation()
示例#6
0
	def _create_multipart_layer(self, orientation):
		WELL_OUTER = (Vec3(-2,0,-1), Vec3(3,0,-6))
		WELL_CORE = (Vec3(-1,0,-2), Vec3(2,0,-5))
		WELL_INNER = (Vec3(0,0,-3), Vec3(1,0,-4))

		WELL_GROUND = []
		WELL_GROUND.append(BuildingBlock(WELL_OUTER[0], block.GRAVEL, WELL_OUTER[1]))
		WELL_GROUND.append(BuildingBlock(WELL_CORE[0], block.STONE, WELL_CORE[1]))
		WELL_GROUND.append(BuildingBlock(WELL_INNER[0], block.WATER, WELL_INNER[1]))

		sut = BuildingLayer(WELL_GROUND, 0)
		sut = self._rotate_sut(sut, orientation)
		return sut
示例#7
0
	def _create_building(self, orientation):
		WELL_OUTER = (Vec3(0,0,0), Vec3(-5,0,-5))
		WELL_CORE = (Vec3(-1,0,-1), Vec3(-4,0,-4))
		WELL_INNER = (Vec3(-2,0,-2), Vec3(-3,0,-3))
		WELL_WIDTH = 6

		WELL_BASE = []
		WELL_BASE.append(BuildingBlock(WELL_CORE[0], block.COBBLESTONE, WELL_CORE[1]))

		WELL_WATER = []
		WELL_WATER.append(BuildingBlock(WELL_CORE[0], block.COBBLESTONE, WELL_CORE[1]))
		WELL_WATER.append(BuildingBlock(WELL_INNER[0], block.WATER, WELL_INNER[1]))

		WELL_GROUND = []
		WELL_GROUND.append(BuildingBlock(WELL_OUTER[0], block.GRAVEL, WELL_OUTER[1]))
		WELL_GROUND.append(BuildingBlock(WELL_CORE[0], block.COBBLESTONE, WELL_CORE[1]))
		WELL_GROUND.append(BuildingBlock(WELL_INNER[0], block.WATER, WELL_INNER[1]))

		WELL_WALLS = []
		WELL_WALLS.append(BuildingBlock(WELL_CORE[0], block.COBBLESTONE, WELL_CORE[1]))
		WELL_WALLS.append(BuildingBlock(WELL_INNER[0], block.AIR, WELL_INNER[1]))

		WELL_SUPPORT = []
		WELL_SUPPORT.append(BuildingBlock(Vec3(-1,0,-1), block.FENCE))
		WELL_SUPPORT.append(BuildingBlock(Vec3(-1,0,-4), block.FENCE))
		WELL_SUPPORT.append(BuildingBlock(Vec3(-4,0,-4), block.FENCE))
		WELL_SUPPORT.append(BuildingBlock(Vec3(-4,0,-1), block.FENCE))
		
		bl = Building(orientation, WELL_WIDTH)
		bl.layers.append(BuildingLayer(WELL_BASE, -3))
		bl.layers.append(BuildingLayer(WELL_WATER, -2))
		bl.layers.append(BuildingLayer(WELL_GROUND, -1))
		bl.layers.append(BuildingLayer(WELL_WALLS, 0))
		bl.layers.append(BuildingLayer(WELL_SUPPORT, 1))
		bl.layers.append(BuildingLayer(WELL_SUPPORT, 2))
		bl.layers.append(BuildingLayer(WELL_BASE, 3))
		
		# set_direction needs to be called after adding layers to building
		bl._set_orientation()

		# rotate offset for test:
		if orientation == Building.EAST:
			self.default_offset.rotateRight()
		elif orientation == Building.SOUTH:
			self.default_offset.rotateRight()
			self.default_offset.rotateRight()
		elif orientation == Building.WEST:
			self.default_offset.rotateLeft()

		return bl
示例#8
0
    def __init__(self, *args, **kwargs):
        super(SmallHouseV3, self).__init__(*args, **kwargs)

        #######################################################################
        # build the roof
        layer_blocks = []

        # fill full building span with wood for roof
        layer_blocks.append(
            BuildingBlock(SmallHouseV2Base.WALLS_CORNER_POS['South East'],
                          block.WOOD,
                          SmallHouseV2Base.WALLS_CORNER_POS['North West'],
                          description="Roof"))

        # clear corners
        for key, pos in SmallHouseV2Base.WALLS_CORNER_POS.items():
            layer_blocks.append(
                BuildingBlock(pos, block.AIR,
                              description="Clear roof corners"))

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        self._set_orientation()
示例#9
0
    def __init__(self, *args, **kwargs):
        super(Blacksmith, self).__init__(width=Blacksmith.WIDTH,
                                         *args,
                                         **kwargs)

        #######################################################################
        # level 1
        layer_blocks = []
        layer_blocks.append(
            BuildingBlock(Blacksmith.WALLS_CORNER_POS['South East'],
                          block.COBBLESTONE,
                          Blacksmith.WALLS_CORNER_POS['North West'],
                          description="Base"))
        layer_blocks.append(
            Stair(Blacksmith.STAIR_SPAN[0],
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  Blacksmith.STAIR_SPAN[1],
                  description="Steps"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        #######################################################################
        # common blocks on several levels
        fences = []
        for pos in Blacksmith.FENCES_POS:
            fences.append(BuildingBlock(pos, block.FENCE, description="Post"))

        corners = []
        for pos in Blacksmith.CORNER_POSTS:
            corners.append(
                BuildingBlock(pos, block.WOOD, description="Corner block"))

        # walls, corners & fences are all included in layers that have walls.
        walls = []
        for span in Blacksmith.WALL_SPANS:
            walls.append(
                BuildingBlock(span[0],
                              block.WOOD_PLANKS,
                              span[1],
                              description=span[2]))

        walls.extend(corners)
        walls.extend(fences)

        walls.append(
            BuildingBlock(Blacksmith.DOOR_POS,
                          block.AIR,
                          description="Clear door"))

        #######################################################################
        # level 2
        # fire pit & furnace
        layer_blocks.append(
            BuildingBlock(Blacksmith.LAVAPIT_SPAN[0],
                          block.COBBLESTONE,
                          Blacksmith.LAVAPIT_SPAN[1],
                          description="Lava pit"))
        layer_blocks.append(
            BuildingBlock(Blacksmith.LAVA_SPAN[0],
                          block.LAVA_STATIONARY,
                          Blacksmith.LAVA_SPAN[1],
                          description="Lava"))
        layer_blocks.append(
            BuildingBlock(Blacksmith.FURNACE_POS,
                          block.COBBLESTONE,
                          description="Furnace base"))
        # walls
        layer_blocks.extend(walls)

        # seating area
        layer_blocks.append(
            BuildingBlock(Blacksmith.WALLS_CORNER_POS['North East'] +
                          Vec3(-1, 0, 1),
                          block.WOOD_PLANKS,
                          description="Seating area corner"))
        layer_blocks.append(
            Stair(Blacksmith.WALLS_CORNER_POS['North East'] + Vec3(-2, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  description="North seat"))
        layer_blocks.append(
            Stair(Blacksmith.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 2),
                  block.STAIRS_WOOD.withData(Stair.EAST),
                  description="East seat"))
        layer_blocks.append(
            BuildingBlock(Blacksmith.WALLS_CORNER_POS['North East'] +
                          Vec3(-2, 0, 2),
                          block.FENCE,
                          description="Table base"))

        # anvil & chest
        layer_blocks.append(
            BuildingBlock(Blacksmith.WALLS_CORNER_POS['South West'] +
                          Vec3(1, 0, -2),
                          block.STONE_SLAB_DOUBLE,
                          description="Anvil"))
        layer_blocks.append(
            Chest(Blacksmith.WALLS_CORNER_POS['North East'] + Vec3(-5, 0, 1),
                  block.CHEST.withData(Chest.EAST),
                  description="Chest"))

        self.add_layer(BuildingLayer(layer_blocks, 1))
        del layer_blocks[:]

        #######################################################################
        # level 3
        # lava pit & furnace area
        furnace = Furnace(Blacksmith.FURNACE_POS,
                          block.FURNACE_INACTIVE.withData(Furnace.SOUTH),
                          description="Furnace")

        layer_blocks.append(
            BuildingBlock(Blacksmith.LAVAPIT_SPAN[0],
                          block.COBBLESTONE,
                          Blacksmith.LAVAPIT_SPAN[1],
                          description="Lava pit"))
        layer_blocks.append(
            BuildingBlock(Blacksmith.LAVA_SPAN[0] + Vec3(-1, 0, 0),
                          block.AIR,
                          Blacksmith.LAVA_SPAN[1] + Vec3(0, 0, 1),
                          description="Clear area over lava"))
        # TODO: are IRON BARS available? - don't see in block list
        layer_blocks.append(
            BuildingBlock(Blacksmith.LAVAPIT_SPAN[0] + Vec3(0, 0, 1),
                          block.DOOR_IRON,
                          Blacksmith.LAVAPIT_SPAN[0] + Vec3(0, 0, 2),
                          description="Iron doors to west of lava pit"))
        layer_blocks.append(furnace)
        layer_blocks.extend(walls)

        # windows
        for pos, desc in Blacksmith.WINDOWS_POS:
            layer_blocks.append(
                BuildingBlock(pos, block.GLASS_PANE, description=desc))

        # TODO: table top, no carpet or pressure plates in mcpi, single stone slab?
        layer_blocks.append(
            BuildingBlock(Blacksmith.WALLS_CORNER_POS['North East'] +
                          Vec3(-2, 0, 2),
                          TABLE_TOP,
                          description="Table top"))

        self.add_layer(BuildingLayer(layer_blocks, 2))
        del layer_blocks[:]

        # remove door clear from walls:
        walls = walls[:len(walls) - 1]

        #######################################################################
        # level 4
        # lava pit & furnace area
        layer_blocks.append(
            BuildingBlock(Blacksmith.LAVAPIT_SPAN[0],
                          block.COBBLESTONE,
                          Blacksmith.LAVAPIT_SPAN[1],
                          description="Lava pit ceiling"))
        layer_blocks.append(furnace)
        layer_blocks.extend(walls)

        self.add_layer(BuildingLayer(layer_blocks, 3))
        del layer_blocks[:]

        #######################################################################
        # level 5 roof
        layer_blocks.append(
            BuildingBlock(Blacksmith.WALLS_CORNER_POS['South East'],
                          block.COBBLESTONE,
                          Blacksmith.WALLS_CORNER_POS['North West'],
                          description="Roof"))
        layer_blocks.extend(corners)

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        #######################################################################
        # level 6 roof surround
        layer_blocks.append(
            BuildingBlock(Blacksmith.WALLS_CORNER_POS['South East'],
                          block.STONE_SLAB,
                          Blacksmith.WALLS_CORNER_POS['North West'],
                          description="Roof half slabs"))
        # clear slabs inside border
        layer_blocks.append(
            BuildingBlock(
                Blacksmith.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1),
                block.AIR,
                Blacksmith.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1),
                description="clear central roof slabs"))

        self.add_layer(BuildingLayer(layer_blocks, 5))
        del layer_blocks[:]

        self._set_orientation()
示例#10
0
    def __init__(self, *args, **kwargs):
        super(Butcher, self).__init__(width=Butcher.WIDTH, *args, **kwargs)

        layer_blocks = []
        #######################################################################
        # level 1
        # Pen
        layer_blocks.append(
            BuildingBlock(Butcher.PEN_CORNERS_POS['South West'],
                          block.DIRT,
                          Butcher.PEN_CORNERS_POS['North East'],
                          description="Pen base"))
        walls = []
        # Walls
        walls.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          Butcher.WALLS_CORNER_POS['North West'],
                          description="West wall base"))
        walls.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['North West'],
                          block.COBBLESTONE,
                          Butcher.WALLS_CORNER_POS['North East'],
                          description="North wall base"))
        walls.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['North East'],
                          block.COBBLESTONE,
                          Butcher.WALLS_CORNER_POS['South East'],
                          description="East wall base"))
        walls.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['South East'],
                          block.COBBLESTONE,
                          Butcher.WALLS_CORNER_POS['South West'],
                          description="South wall base"))
        layer_blocks.extend(walls)

        # floor
        for pos1, pos2, block_type in Butcher.FLOOR_SPANS:
            layer_blocks.append(
                BuildingBlock(pos1, block_type, pos2, description="floor"))

        # door steps
        layer_blocks.append(
            Stair(Butcher.SOUTH_DOOR_POS + Vec3(0, 0, 1),
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="Front door step"))
        layer_blocks.append(
            BuildingBlock(Butcher.NORTH_DOOR_POS + Vec3(0, 0, -1),
                          block.COBBLESTONE,
                          description="Pen door step"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        #######################################################################
        # level 2
        # Pen fences
        layer_blocks.append(
            BuildingBlock(Butcher.PEN_CORNERS_POS['South West'],
                          block.FENCE,
                          Butcher.PEN_CORNERS_POS['North West'],
                          description="West pen fence"))
        layer_blocks.append(
            BuildingBlock(Butcher.PEN_CORNERS_POS['North West'],
                          block.FENCE,
                          Butcher.PEN_CORNERS_POS['North East'],
                          description="North pen fence"))
        layer_blocks.append(
            BuildingBlock(Butcher.PEN_CORNERS_POS['North East'],
                          block.FENCE,
                          Butcher.PEN_CORNERS_POS['South East'],
                          description="East pen fence"))
        # Walls
        layer_blocks.extend(walls)
        layer_blocks.append(
            BuildingBlock(Butcher.SOUTH_DOOR_POS,
                          block.AIR,
                          description="Clear front door"))
        layer_blocks.append(
            BuildingBlock(Butcher.NORTH_DOOR_POS,
                          block.AIR,
                          description="Clear pen door"))

        # table
        layer_blocks.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['North West'] +
                          Vec3(1, 0, 1),
                          block.WOOD_PLANKS,
                          description="Table area corner"))
        layer_blocks.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['North West'] +
                          Vec3(2, 0, 2),
                          block.FENCE,
                          description="Table base"))
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 2),
                  block.STAIRS_WOOD.withData(Stair.WEST),
                  description="West seat"))
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  description="North seat"))

        # counter
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South East'] + Vec3(-2, 0, -1),
                block.STONE_SLAB_DOUBLE,
                Butcher.WALLS_CORNER_POS['South East'] + Vec3(-2, 0, -2),
                description="Counter"))

        self.add_layer(BuildingLayer(layer_blocks, 1))
        del layer_blocks[:]

        #######################################################################
        # level 3
        # corners
        for key, pos in Butcher.WALLS_CORNER_POS.items():
            layer_blocks.append(
                BuildingBlock(pos,
                              block.COBBLESTONE,
                              description=key + " corner"))
        # north and south walls
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0),
                description="North wall"))
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0),
                description="South wall"))

        # east and west walls
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                block.WOOD,
                Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1),
                description="West wall"))
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                block.WOOD,
                Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                description="East wall"))

        # windows
        for key, span in Butcher.WINDOW_SPANS.items():
            # clear the space first:
            layer_blocks.append(
                BuildingBlock(span[0],
                              block.GLASS_PANE,
                              span[1],
                              description=key + " window"))

        layer_blocks.append(
            BuildingBlock(Butcher.SOUTH_DOOR_POS,
                          block.AIR,
                          description="Clear front door"))
        layer_blocks.append(
            BuildingBlock(Butcher.NORTH_DOOR_POS,
                          block.AIR,
                          description="Clear pen door"))

        # TODO: table top
        layer_blocks.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['North West'] +
                          Vec3(2, 0, 2),
                          TABLE_TOP,
                          description="Table top"))

        self.add_layer(BuildingLayer(layer_blocks, 2))
        del layer_blocks[:]

        #######################################################################
        # level 4
        # east & west stone walls
        layer_blocks.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          Butcher.WALLS_CORNER_POS['North West'],
                          description="West wall"))
        layer_blocks.append(
            BuildingBlock(Butcher.WALLS_CORNER_POS['South East'],
                          block.COBBLESTONE,
                          Butcher.WALLS_CORNER_POS['North East'],
                          description="East wall"))
        # north and south wood walls
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0),
                description="North wall"))
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0),
                description="South wall"))

        # north and south roof eaves
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, -1),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, -1),
                  description="North roof eaves"))
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, 1),
                  description="South roof eaves"))
        # torches over doors
        layer_blocks.append(
            Torch(Butcher.SOUTH_DOOR_POS + Vec3(0, 0, -1),
                  block.TORCH.withData(Torch.NORTH),
                  description="Torch over front door"))
        layer_blocks.append(
            Torch(Butcher.NORTH_DOOR_POS + Vec3(0, 0, 1),
                  block.TORCH.withData(Torch.SOUTH),
                  description="Torch over pen door"))

        self.add_layer(BuildingLayer(layer_blocks, 3))
        del layer_blocks[:]

        #######################################################################
        # level 5
        # east & west gables
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1),
                description="West gable"))
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                description="East gable"))
        # north and south rafters
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                description="North rafters"))
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                description="South rafters"))

        # north and south roof
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['North West'],
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Butcher.WALLS_CORNER_POS['North East'],
                  description="North roof"))
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['South East'],
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Butcher.WALLS_CORNER_POS['South West'],
                  description="South roof"))

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        #######################################################################
        # level 6
        # rafters
        layer_blocks.append(
            BuildingBlock(
                Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2),
                block.WOOD_PLANKS,
                Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2),
                description="Rafters"))

        # north and south roof
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                  description="North roof"))
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                  description="South roof"))

        self.add_layer(BuildingLayer(layer_blocks, 5))
        del layer_blocks[:]

        #######################################################################
        # level 7
        # north and south roof
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 2),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2),
                  description="North roof"))
        layer_blocks.append(
            Stair(Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2),
                  description="South roof"))

        self.add_layer(BuildingLayer(layer_blocks, 6))
        del layer_blocks[:]

        # add the door
        self.add_block(
            Door(None,
                 Vec3(Butcher.SOUTH_DOOR_POS.x, 1, Butcher.SOUTH_DOOR_POS.z),
                 block.DOOR_WOOD.withData(Door.SOUTH)))

        self.add_block(
            Door(None,
                 Vec3(Butcher.NORTH_DOOR_POS.x, 1, Butcher.NORTH_DOOR_POS.z),
                 block.DOOR_WOOD.withData(Door.NORTH)))

        self._set_orientation()
示例#11
0
    def __init__(self, *args, **kwargs):
        super(Library, self).__init__(width=Library.WIDTH, *args, **kwargs)

        layer_blocks = []
        ########################################################################
        # level 1
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          Library.WALLS_CORNER_POS['North East'],
                          description="Floor"))

        layer_blocks.append(
            Stair(Library.DOOR_POS + Vec3(0, 0, 1),
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="Front door step"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        ########################################################################
        # level 2
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          Library.WALLS_CORNER_POS['North West'],
                          description="West wall"))
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['North West'],
                          block.COBBLESTONE,
                          Library.WALLS_CORNER_POS['North East'],
                          description="North wall"))
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['North East'],
                          block.COBBLESTONE,
                          Library.WALLS_CORNER_POS['South East'],
                          description="East wall"))
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South East'],
                          block.COBBLESTONE,
                          Library.WALLS_CORNER_POS['South West'],
                          description="South wall"))
        # Clear door space
        layer_blocks.append(
            BuildingBlock(Library.DOOR_POS,
                          block.AIR,
                          description="Clear door"))
        # seats corner
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['North West'] +
                          Vec3(1, 0, 1),
                          block.WOOD_PLANKS,
                          description="seat corner"))
        # seats
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 2),
                  block.STAIRS_WOOD.withData(Stair.WEST),
                  description="west seat"))
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Library.WALLS_CORNER_POS['North West'] + Vec3(5, 0, 1),
                  description="north seats"))
        # table bases
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'] +
                          Vec3(2, 0, -3),
                          block.FENCE,
                          description="table base"))
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'] +
                          Vec3(4, 0, -3),
                          block.FENCE,
                          description="table base"))

        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'] +
                          Vec3(1, 0, -1),
                          block.CRAFTING_TABLE,
                          description="crafting table"))

        self.add_layer(BuildingLayer(layer_blocks, 1))
        del layer_blocks[:]

        ########################################################################
        # Common sets of blocks
        corners = []
        for key, pos in Library.WALLS_CORNER_POS.items():
            corners.append(
                BuildingBlock(pos,
                              block.COBBLESTONE,
                              description=key + " corner"))
        # north windows are only used on 1 layer,
        # east, south & west are used on 2 levels
        other_windows = []
        for key, span in Library.OTHER_WIN_SPANS.items():
            other_windows.append(
                BuildingBlock(span[0],
                              block.GLASS_PANE,
                              span[1],
                              description=key + " window"))

        # these walls are used on 3 levels
        walls = []
        walls.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                block.WOOD_PLANKS,
                Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1),
                description="West wall"))
        walls.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0),
                block.WOOD_PLANKS,
                Library.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0),
                description="North wall"))
        walls.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                block.WOOD_PLANKS,
                Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                description="East wall"))
        walls.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0),
                block.WOOD_PLANKS,
                Library.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0),
                description="South wall"))

        ########################################################################
        # level 3
        # corners & walls
        layer_blocks.extend(corners)
        layer_blocks.extend(walls)

        # north windows
        for key, span in Library.NORTH_WIN_SPANS.items():
            layer_blocks.append(
                BuildingBlock(span[0],
                              block.GLASS_PANE,
                              span[1],
                              description=key + " window"))
        # other windows
        layer_blocks.extend(other_windows)

        # Clear door space
        layer_blocks.append(
            BuildingBlock(Library.DOOR_POS,
                          block.AIR,
                          description="clear door"))

        # table bases
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'] +
                          Vec3(2, 0, -3),
                          TABLE_TOP,
                          description="table top"))
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'] +
                          Vec3(4, 0, -3),
                          TABLE_TOP,
                          description="table top"))

        self.add_layer(BuildingLayer(layer_blocks, 2))
        del layer_blocks[:]

        ########################################################################
        # level 4
        # corners & walls
        layer_blocks.extend(corners)
        layer_blocks.extend(walls)

        # books
        layer_blocks.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1),
                block.BOOKSHELF,
                Library.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 1),
                description="Book shelves"))

        # other windows
        layer_blocks.extend(other_windows)

        self.add_layer(BuildingLayer(layer_blocks, 3))
        del layer_blocks[:]

        ########################################################################
        # level 5
        # corners & walls
        layer_blocks.extend(corners)
        layer_blocks.extend(walls)

        layer_blocks.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1),
                block.WOOD_PLANKS,
                Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                description="North rafters"))
        layer_blocks.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                block.WOOD_PLANKS,
                Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                description="South rafters"))

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        ########################################################################
        # level 6
        layer_blocks.append(
            BuildingBlock(Library.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          Library.WALLS_CORNER_POS['North East'],
                          description="Ceiling"))
        # north and south roof eaves
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, -1),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, -1),
                  description="North roof eaves"))
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, 1),
                  description="South roof eaves"))

        self.add_layer(BuildingLayer(layer_blocks, 5))
        del layer_blocks[:]

        ########################################################################
        # level 7
        layer_blocks.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                block.COBBLESTONE,
                Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                description="Ceiling"))
        # north and south roof eaves
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['North West'],
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Library.WALLS_CORNER_POS['North East'],
                  description="North roof eaves"))
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['South East'],
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Library.WALLS_CORNER_POS['South West'],
                  description="South roof eaves"))

        self.add_layer(BuildingLayer(layer_blocks, 6))
        del layer_blocks[:]

        ########################################################################
        # level 8
        # TODO: adjust positsions
        layer_blocks.append(
            BuildingBlock(
                Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2),
                block.COBBLESTONE,
                Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2),
                description="Ceiling"))
        # north and south roof eaves
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1),
                  description="North roof eaves"))
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                  description="South roof eaves"))

        self.add_layer(BuildingLayer(layer_blocks, 7))
        del layer_blocks[:]

        ########################################################################
        # level 9
        # TODO: adjust positsions
        # north and south roof eaves
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 2),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2),
                  description="North roof eaves"))
        layer_blocks.append(
            Stair(Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2),
                  description="South roof eaves"))

        self.add_layer(BuildingLayer(layer_blocks, 8))
        del layer_blocks[:]

        ########################################################################
        # add the door
        self.add_block(
            Door(Door.HINGE_LEFT,
                 Vec3(Library.DOOR_POS.x, 1, Library.DOOR_POS.z),
                 block.DOOR_WOOD.withData(Door.SOUTH)))

        self._set_orientation()
示例#12
0
    def __init__(self, *args, **kwargs):
        super(Church, self).__init__(width=Church.WIDTH, *args, **kwargs)

        ladder = Ladder(Church.LADDER_POS,
                        block.LADDER.withData(Ladder.EAST),
                        description="Ladder on facing east")

        layer_blocks = []
        #######################################################################
        # level 1
        layer_blocks.append(
            BuildingBlock(Church.BASE_SPAN[0],
                          block.COBBLESTONE,
                          Church.BASE_SPAN[1],
                          description="Base"))
        layer_blocks.append(
            BuildingBlock(Church.WALL_NW_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_NW_SPAN[1],
                          description="West Wall base"))
        layer_blocks.append(
            BuildingBlock(Church.WALL_NE_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_NE_SPAN[1],
                          description="East Wall base"))
        layer_blocks.append(
            Stair(Church.DOOR_POS + Vec3(0, 0, 1),
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="Front Stair"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        #######################################################################
        # common blocks
        walls = []
        walls.append(
            BuildingBlock(Church.WALL_W_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_W_SPAN[1],
                          description="Full west wall"))
        walls.append(
            BuildingBlock(Church.WALL_N_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_N_SPAN[1],
                          description="North wall"))
        walls.append(
            BuildingBlock(Church.WALL_E_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_E_SPAN[1],
                          description="Full East wall"))
        walls.append(
            BuildingBlock(Church.WALL_S_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_S_SPAN[1],
                          description="South wall"))
        walls.append(ladder)

        #######################################################################
        # level 2
        layer_blocks.extend(walls)
        layer_blocks.append(
            BuildingBlock(Church.DOOR_POS,
                          block.AIR,
                          description="Clearing Door"))

        layer_blocks.append(
            BuildingBlock(Building.SE_CORNER_POS + Vec3(-3, 0, -7),
                          block.COBBLESTONE,
                          Building.SE_CORNER_POS + Vec3(-1, 0, -8),
                          description="Altar base"))
        layer_blocks.append(
            Stair(Building.SE_CORNER_POS + Vec3(-3, 0, -6),
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="West Stair, facing north"))
        layer_blocks.append(
            Stair(Building.SE_CORNER_POS + Vec3(-2, 0, -7),
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="Center Stair, facing north"))
        layer_blocks.append(
            Stair(Building.SE_CORNER_POS + Vec3(-1, 0, -6),
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="East Stair, facing north"))

        self.add_layer(BuildingLayer(layer_blocks, 1))
        del layer_blocks[:]

        #######################################################################
        # level 3
        layer_blocks.extend(walls)
        layer_blocks.append(
            BuildingBlock(Church.DOOR_POS,
                          block.AIR,
                          description="Clearing Door"))

        layer_blocks.append(
            Stair(Building.SE_CORNER_POS + Vec3(-3, 0, -8),
                  block.STAIRS_COBBLESTONE.withData(Stair.WEST),
                  description="West stair, facing west"))
        layer_blocks.append(
            Stair(Building.SE_CORNER_POS + Vec3(-1, 0, -8),
                  block.STAIRS_COBBLESTONE.withData(Stair.EAST),
                  description="East stair, facing east"))

        for pos in Church.WINS_S_POS:
            layer_blocks.append(
                BuildingBlock(pos,
                              block.GLASS_PANE,
                              description="Glass pane, south"))

        self.add_layer(BuildingLayer(layer_blocks, 2))
        del layer_blocks[:]

        #######################################################################
        # level 4
        layer_blocks.extend(walls)
        for pos in Church.WINS_S_POS:
            layer_blocks.append(
                BuildingBlock(pos,
                              block.GLASS_PANE,
                              description="Glass pane, south"))
        for pos in Church.WINS_N_POS:
            layer_blocks.append(
                BuildingBlock(pos,
                              block.GLASS_PANE,
                              description="Glass pane, north"))

        self.add_layer(BuildingLayer(layer_blocks, 3))
        del layer_blocks[:]

        #######################################################################
        # level 5
        # insert the tower floor before the ladder in the walls list here
        walls.insert(
            4,
            BuildingBlock(Church.TOWER_FLOOR_SPAN[0],
                          block.COBBLESTONE,
                          Church.TOWER_FLOOR_SPAN[1],
                          description="Tower floor"))
        layer_blocks.extend(walls)
        layer_blocks.append(
            BuildingBlock(Church.WALL_TN_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_TN_SPAN[1],
                          description="Tower north wall"))
        layer_blocks.append(
            BuildingBlock(Building.SE_CORNER_POS + Vec3(-4, 0, -1),
                          block.COBBLESTONE,
                          description="Filling south west corner"))
        layer_blocks.append(
            BuildingBlock(Building.SE_CORNER_POS + Vec3(0, 0, -1),
                          block.COBBLESTONE,
                          description="Filling south east corner"))

        layer_blocks.append(
            Torch(Building.SE_CORNER_POS + Vec3(-1, 0, -7),
                  block.TORCH.withData(Torch.WEST),
                  description="East wall torch facing west"))
        layer_blocks.append(
            Torch(Building.SE_CORNER_POS + Vec3(-2, 0, -6),
                  block.TORCH.withData(Torch.NORTH),
                  description="South wall torch facing north"))
        layer_blocks.append(
            Torch(Building.SE_CORNER_POS + Vec3(-3, 0, -7),
                  block.TORCH.withData(Torch.EAST),
                  description="West wall torch facing east"))
        layer_blocks.append(
            Torch(Building.SE_CORNER_POS + Vec3(-2, 0, -8),
                  block.TORCH.withData(Torch.SOUTH),
                  description="North wall torch facing south"))

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        # reset walls for tower
        del walls[:]
        walls.append(
            BuildingBlock(Church.WALL_SW_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_SW_SPAN[1],
                          description="Tower west wall"))
        walls.append(
            BuildingBlock(Church.WALL_TN_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_TN_SPAN[1],
                          description="Tower north wall"))
        walls.append(
            BuildingBlock(Church.WALL_SE_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_SE_SPAN[1],
                          description="Tower east wall"))
        walls.append(
            BuildingBlock(Church.WALL_S_SPAN[0],
                          block.COBBLESTONE,
                          Church.WALL_S_SPAN[1],
                          description="Tower south wall"))
        walls.append(ladder)

        # level 6
        layer_blocks.extend(walls)
        layer_blocks.append(
            BuildingBlock(Church.ROOF_SPAN[0],
                          block.COBBLESTONE,
                          Church.ROOF_SPAN[1],
                          description="Northern roof span"))

        self.add_layer(BuildingLayer(layer_blocks, 5))
        del layer_blocks[:]

        # levels 7 & 8 are same
        layer_blocks.extend(walls)
        for pos in Church.TOWER_WIN_POS:
            layer_blocks.append(
                BuildingBlock(pos,
                              block.GLASS_PANE,
                              description="Tower window"))

        self.add_layer(BuildingLayer(layer_blocks, 6))
        self.add_layer(BuildingLayer(layer_blocks, 7))
        del layer_blocks[:]

        # level 9
        # nothing to add here just tower walls
        self.add_layer(BuildingLayer(walls, 8))

        # level 10
        # insert floor into walls here before ladder
        # fill corners of tower at this level
        walls.insert(
            4,
            BuildingBlock(Church.TOWER_FLOOR_SPAN[0],
                          block.COBBLESTONE,
                          Church.TOWER_FLOOR_SPAN[1],
                          description="Tower floor"))

        self.add_layer(BuildingLayer(walls, 9))

        # level 11
        # remove floor & ladder at his level.
        walls = walls[:4]
        self.add_layer(BuildingLayer(walls, 10))

        # level 12
        for pos in Church.TOWER_WIN_POS:
            layer_blocks.append(
                BuildingBlock(pos,
                              block.COBBLESTONE,
                              description="Tower crenellation"))

        self.add_layer(BuildingLayer(layer_blocks, 11))
        del layer_blocks[:]

        # add the door
        self.add_block(
            Door(None, Vec3(Church.DOOR_POS.x, 1, Church.DOOR_POS.z),
                 block.DOOR_WOOD.withData(Door.SOUTH)))

        self._set_orientation()
示例#13
0
    def __init__(self, *args, **kwargs):
        super(SmallHouseV1, self).__init__(width=SmallHouseV1.WIDTH,
                                           *args,
                                           **kwargs)

        #######################################################################
        # Level 1:
        layer_blocks = []
        layer_blocks.append(
            BuildingBlock(SmallHouseV1.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          SmallHouseV1.WALLS_CORNER_POS['North East'],
                          description="House base"))
        layer_blocks.append(
            Stair(SmallHouseV1.STEP_POS,
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="Front step"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        #######################################################################
        # Common blocks:
        walls = []

        # cobblestone corners
        for key, pos in SmallHouseV1.WALLS_CORNER_POS.items():
            walls.append(
                BuildingBlock(pos,
                              block.COBBLESTONE,
                              description="Corner stone"))

        # wood plank walls
        for pos1, pos2, desc in SmallHouseV1.WALL_SPANS:
            walls.append(BuildingBlock(pos1, block.WOOD_PLANKS, pos2, desc))

        # ladder
        ladder = Ladder(SmallHouseV1.LADDER_POS,
                        block.LADDER.withData(Ladder.SOUTH),
                        description="Ladder")
        walls.append(ladder)

        #######################################################################
        # Level 2:
        # add walls as above & clear door
        layer_blocks.extend(walls)

        layer_blocks.append(
            BuildingBlock(SmallHouseV1.DOOR_POS,
                          block.AIR,
                          description="Clear door"))
        self.add_layer(BuildingLayer(layer_blocks, 1))
        del layer_blocks[:]

        #######################################################################
        # Level 3:
        # add walls, clear door	& add windows
        layer_blocks.extend(walls)

        layer_blocks.append(
            BuildingBlock(SmallHouseV1.DOOR_POS,
                          block.AIR,
                          description="Clear door"))

        for pos in SmallHouseV1.WIN_POS:
            layer_blocks.append(
                BuildingBlock(pos, block.GLASS_PANE, description="Window"))

        self.add_layer(BuildingLayer(layer_blocks, 2))
        del layer_blocks[:]

        #######################################################################
        # Level 4:
        # add walls & torch over door
        layer_blocks.extend(walls)

        layer_blocks.append(
            Torch(SmallHouseV1.TORCH_POS,
                  block.TORCH.withData(Torch.NORTH),
                  description="Torch over door"))
        self.add_layer(BuildingLayer(layer_blocks, 3))
        del layer_blocks[:]

        #######################################################################
        # build the roof
        layer_blocks.append(
            BuildingBlock(SmallHouseV1.WALLS_CORNER_POS['South East'],
                          block.WOOD,
                          SmallHouseV1.WALLS_CORNER_POS['North West'],
                          description="Roof wood span"))
        layer_blocks.append(
            BuildingBlock(
                SmallHouseV1.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1),
                block.WOOD_PLANKS,
                SmallHouseV1.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1),
                description="Roof wood plank span"))

        layer_blocks.append(
            BuildingBlock(SmallHouseV1.LADDER_POS,
                          block.AIR,
                          description="Clear ladder space"))

        layer_blocks.append(ladder)

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        #######################################################################
        # add the fences to the roof
        layer_blocks.append(
            BuildingBlock(SmallHouseV1.WALLS_CORNER_POS['South East'],
                          block.FENCE,
                          SmallHouseV1.WALLS_CORNER_POS['North West'],
                          description="Cover roof with fences"))
        layer_blocks.append(
            BuildingBlock(
                SmallHouseV1.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1),
                block.AIR,
                SmallHouseV1.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1),
                description="Clear fences from inner roof"))

        self.add_layer(BuildingLayer(layer_blocks, 5))
        del layer_blocks[:]

        #######################################################################
        # add the door
        self.add_block(
            Door(Door.HINGE_RIGHT,
                 Vec3(SmallHouseV1.DOOR_POS.x, 1, SmallHouseV1.DOOR_POS.z),
                 block.DOOR_WOOD.withData(Door.SOUTH),
                 description="Front door"))

        self._set_orientation()
示例#14
0
    def __init__(self, *args, **kwargs):
        super(SmallHouseV2Base, self).__init__(width=SmallHouseV2Base.WIDTH,
                                               *args,
                                               **kwargs)

        #######################################################################
        # Level 1:
        layer_blocks = []
        layer_blocks.append(
            BuildingBlock(SmallHouseV2Base.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          SmallHouseV2Base.WALLS_CORNER_POS['North East'],
                          description="House base"))
        layer_blocks.append(
            BuildingBlock(SmallHouseV2Base.WALLS_CORNER_POS['South East'] +
                          Vec3(-1, 0, -1),
                          block.DIRT,
                          SmallHouseV2Base.WALLS_CORNER_POS['North West'] +
                          Vec3(1, 0, 1),
                          description="House inner base"))
        layer_blocks.append(
            Stair(SmallHouseV2Base.STEP_POS,
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="Front step"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        #######################################################################
        # Common blocks:
        walls = []

        # wood corners
        for key, pos in SmallHouseV2Base.WALLS_CORNER_POS.items():
            walls.append(
                BuildingBlock(pos, block.WOOD, description="Corner wood"))

        # wood plank walls
        for pos1, pos2, desc in SmallHouseV2Base.WALL_SPANS:
            walls.append(BuildingBlock(pos1, block.WOOD_PLANKS, pos2, desc))

        #######################################################################
        # Level 2:
        # add walls as above & clear door
        layer_blocks.extend(walls)

        layer_blocks.append(
            BuildingBlock(SmallHouseV2Base.DOOR_POS,
                          block.AIR,
                          description="Clear door"))
        self.add_layer(BuildingLayer(layer_blocks, 1))
        del layer_blocks[:]

        #######################################################################
        # Level 3:
        # add walls, clear door	& add windows
        layer_blocks.extend(walls)

        layer_blocks.append(
            BuildingBlock(SmallHouseV2Base.DOOR_POS,
                          block.AIR,
                          description="Clear door"))

        for pos in SmallHouseV2Base.WIN_POS:
            layer_blocks.append(
                BuildingBlock(pos, block.GLASS_PANE, description="Window"))

        self.add_layer(BuildingLayer(layer_blocks, 2))
        del layer_blocks[:]

        #######################################################################
        # Level 4:
        # add walls & torch over door
        layer_blocks.extend(walls)

        layer_blocks.append(
            Torch(SmallHouseV2Base.TORCH_POS,
                  block.TORCH.withData(Torch.NORTH),
                  description="Torch over door"))
        self.add_layer(BuildingLayer(layer_blocks, 3))
        del layer_blocks[:]

        # add the door
        self.add_block(
            Door(None,
                 Vec3(SmallHouseV2Base.DOOR_POS.x, 1,
                      SmallHouseV2Base.DOOR_POS.z),
                 block.DOOR_WOOD.withData(Door.SOUTH),
                 description="Front door"))
示例#15
0
    def __init__(self, *args, **kwargs):
        super(LargeHouse, self).__init__(width=LargeHouse.WIDTH,
                                         *args,
                                         **kwargs)

        layer_blocks = []
        #######################################################################
        # common blocks
        walls = []
        walls.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['North West'],
                          description="West wall"))
        walls.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['North West'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['North East'],
                          description="North wall"))
        walls.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['North East'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['East mid west'],
                          description="East wall, north section"))
        walls.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['East mid east'],
                          description="East wall, extension"))
        walls.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid east'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['South East'],
                          description="East wall, south section"))
        walls.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South East'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['South West'],
                          description="South wall"))

        #######################################################################
        # level 1
        layer_blocks.extend(walls)

        for floor_span in LargeHouse.FLOOR_SPANS:
            layer_blocks.append(
                BuildingBlock(floor_span[0],
                              block.WOOD_PLANKS,
                              floor_span[1],
                              description="Floor"))

        layer_blocks.append(
            Stair(LargeHouse.DOOR_POS + Vec3(0, 0, 1),
                  block.STAIRS_COBBLESTONE.withData(Stair.NORTH),
                  description="Front Stair"))

        self.add_layer(BuildingLayer(layer_blocks, 0))
        del layer_blocks[:]

        #######################################################################
        # level 2
        layer_blocks.extend(walls)
        # Clear door space
        layer_blocks.append(
            BuildingBlock(LargeHouse.DOOR_POS,
                          block.AIR,
                          description="Clear door"))

        self.add_layer(BuildingLayer(layer_blocks, 1))
        del layer_blocks[:]

        #######################################################################
        # level 3
        # west wall
        windows = []
        for pos1, pos2, desc in LargeHouse.WINDOW_SPANS:
            windows.append(
                BuildingBlock(pos1,
                              block.WOOD,
                              pos2,
                              description=desc + " frame"))
            windows.append(
                BuildingBlock(pos1 + Vec3(0, 0, -1),
                              block.GLASS_PANE,
                              pos2 + Vec3(0, 0, 1),
                              description=desc))

        windows.append(
            BuildingBlock(LargeHouse.SOUTH_WIN_SPAN[0],
                          block.WOOD,
                          LargeHouse.SOUTH_WIN_SPAN[1],
                          description=LargeHouse.SOUTH_WIN_SPAN[2] + " frame"))
        windows.append(
            BuildingBlock(LargeHouse.SOUTH_WIN_SPAN[0] + Vec3(-1, 0, 0),
                          block.GLASS_PANE,
                          LargeHouse.SOUTH_WIN_SPAN[1] + Vec3(1, 0, 0),
                          description=LargeHouse.SOUTH_WIN_SPAN[2]))

        # north wall is cobblestone,
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['North East'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['North West'],
                          description="North wall"))

        # outer corners are cobblestone
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          description="South West corner"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South East'],
                          block.COBBLESTONE,
                          description="South East corner"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid east'],
                          block.COBBLESTONE,
                          description="East extension corner"))
        # place wood plank blocks
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'],
                          block.WOOD_PLANKS,
                          LargeHouse.WALLS_CORNER_POS['East mid west'] +
                          Vec3(1, 0, 0),
                          description="East extension, planks"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] +
                          Vec3(0, 0, -5),
                          block.WOOD_PLANKS,
                          description="West wall, planks"))

        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] +
                          Vec3(1, 0, 0),
                          block.WOOD_PLANKS,
                          description="South wall, planks"))
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-3, 0, 0),
                description="South wall, door frame"))

        # clear door
        layer_blocks.append(
            BuildingBlock(LargeHouse.DOOR_POS,
                          block.AIR,
                          description="Clear door"))

        # add windows
        layer_blocks.extend(windows)

        self.add_layer(BuildingLayer(layer_blocks, 2))
        del layer_blocks[:]

        #######################################################################
        # level 4
        # walls
        # West, North & North east cobblestone walls
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['North West'],
                          description="West wall"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['North West'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['North East'],
                          description="North wall"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['North East'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['East mid west'] +
                          Vec3(0, 0, -1),
                          description="East wall, north section"))
        # wooden east extension wall
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'],
                          block.WOOD_PLANKS,
                          LargeHouse.WALLS_CORNER_POS['East mid east'] +
                          Vec3(-1, 0, 0),
                          description="East wall, extension"))
        # south east cobblestone wall
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid east'],
                          block.COBBLESTONE,
                          LargeHouse.WALLS_CORNER_POS['South East'],
                          description="East wall, south section"))
        # wooden south wall (cobblestone corners)
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0),
                description="South wall"))

        # roof eaves
        # south roof eaves
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, 1),
                  description="South roof eaves"))
        #
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'] +
                          Vec3(1, 0, -1),
                          block.WOOD_PLANKS,
                          description="East roof eaves corner"))

        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(1, 0, 0),
                  block.STAIRS_WOOD.withData(Stair.WEST),
                  LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(1, 0, 3),
                  description="East roof eaves, west facing"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['East mid east'] +
                  Vec3(0, 0, -1),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  description="East roof eaves, north facing"))

        layer_blocks.append(
            Torch(LargeHouse.DOOR_POS + Vec3(0, 0, -1),
                  block.TORCH.withData(Torch.NORTH)))

        self.add_layer(BuildingLayer(layer_blocks, 3))
        del layer_blocks[:]

        #######################################################################
        # level 5
        # west roof & gable
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -1),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0),
                description="West roof rafters"))
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -4),
                description="West roof gable"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -5),
                  block.STAIRS_WOOD.withData(Stair.EAST),
                  LargeHouse.WALLS_CORNER_POS['North West'],
                  description="West roof"))

        # north gable window
        layer_blocks.append(
            BuildingBlock(LargeHouse.NORTH_WIN_SPAN[0],
                          block.WOOD,
                          LargeHouse.NORTH_WIN_SPAN[1],
                          description=LargeHouse.NORTH_WIN_SPAN[2] + " frame"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.NORTH_WIN_SPAN[0] + Vec3(-1, 0, 0),
                          block.GLASS_PANE,
                          LargeHouse.NORTH_WIN_SPAN[1] + Vec3(1, 0, 0),
                          description=LargeHouse.NORTH_WIN_SPAN[2]))

        # east rafters & gable
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(-1, 0, 1),
                description="East roof rafters"))
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(-1, 0, 1),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(0, 0, 1),
                description="East roof extension rafters"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'],
                          block.WOOD_PLANKS,
                          description="East roof extension corner rafter"))
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(0, 0, 1),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                description="East gable"))
        # east roof
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['North East'],
                  block.STAIRS_WOOD.withData(Stair.WEST),
                  LargeHouse.WALLS_CORNER_POS['East mid west'] +
                  Vec3(0, 0, -1),
                  description="East roof"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(1, 0, 0),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  LargeHouse.WALLS_CORNER_POS['East mid east'],
                  description="East roof extension"))

        # south roof
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                description="South roof rafters"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'],
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  LargeHouse.WALLS_CORNER_POS['South East'],
                  description="South roof"))

        self.add_layer(BuildingLayer(layer_blocks, 4))
        del layer_blocks[:]

        #######################################################################
        # level 6
        # rafters
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -3),
                description="West to east roof rafters & gables"))

        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(2, 0, -4),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 0),
                description="West rafters"))
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(4, 0, -4),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(4, 0, 0),
                description="East rafters"))

        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] +
                          Vec3(1, 0, -4),
                          block.WOOD_PLANKS,
                          description="West roof rafter corner"))
        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] +
                          Vec3(5, 0, -4),
                          block.WOOD_PLANKS,
                          description="East roof rafter corner"))

        layer_blocks.append(
            BuildingBlock(LargeHouse.WALLS_CORNER_POS['North West'] +
                          Vec3(3, 0, 0),
                          block.WOOD_PLANKS,
                          description="North gable"))

        # roof
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -4),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  description="West roof north facing"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -5),
                  block.STAIRS_WOOD.withData(Stair.EAST),
                  LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0),
                  description="West roof"))

        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0),
                  block.STAIRS_WOOD.withData(Stair.WEST),
                  LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 5),
                  description="East roof"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(0, 0, 1),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  LargeHouse.WALLS_CORNER_POS['East mid east'] +
                  Vec3(-2, 0, 1),
                  description="east roof north facing"))

        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1),
                  description="South roof"))

        self.add_layer(BuildingLayer(layer_blocks, 5))
        del layer_blocks[:]

        #######################################################################
        # level 7
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(2, 0, -3),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(4, 0, -3),
                description="East - west rafters"))
        layer_blocks.append(
            BuildingBlock(
                LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(3, 0, 0),
                block.WOOD_PLANKS,
                LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(3, 0, 6),
                description="North - south rafters"))

        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -3),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -3),
                  description="West roof north facing"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 0),
                  block.STAIRS_WOOD.withData(Stair.EAST),
                  LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 6),
                  description="West roof"))

        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(4, 0, 0),
                  block.STAIRS_WOOD.withData(Stair.WEST),
                  LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(4, 0, 6),
                  description="East roof"))
        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -3),
                  block.STAIRS_WOOD.withData(Stair.SOUTH),
                  LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-3, 0, -3),
                  description="east roof north facing"))

        layer_blocks.append(
            Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2),
                  block.STAIRS_WOOD.withData(Stair.NORTH),
                  LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2),
                  description="South roof"))

        self.add_layer(BuildingLayer(layer_blocks, 6))
        del layer_blocks[:]
        #######################################################################
        # add the door
        self.add_block(
            Door(None, Vec3(LargeHouse.DOOR_POS.x, 1, LargeHouse.DOOR_POS.z),
                 block.DOOR_WOOD.withData(Door.SOUTH)))

        self._set_orientation()