Beispiel #1
0
def construct_square_window(level, coords, biome, face=0):
    x = coords[0]
    y = coords[1]
    z = coords[2]
    window_block = BlockUtils.get_window_block(biome)
    if face == 0:
        for i in range(x, x + 2):
            for j in range(y, y - 2, -1):
                utilityFunctions.setBlock(level, window_block, i, j, z)
    elif face == 1:
        for i in range(z, z + 2):
            for j in range(y, y - 2, -1):
                utilityFunctions.setBlock(level, window_block, x, j, i)
Beispiel #2
0
def construct_triangle_window(level, coords, biome, face=0):
    x = coords[0]
    y = coords[1]
    z = coords[2]
    window_block = BlockUtils.get_window_block(biome)
    if face == 0:
        for j in range(y, y - 2, -1):
            utilityFunctions.setBlock(level, window_block, x, j, z)
            if j == y - 1:
                utilityFunctions.setBlock(level, window_block, x - 1, j, z)
                utilityFunctions.setBlock(level, window_block, x + 1, j, z)
    elif face == 1:
        for j in range(y, y - 2, -1):
            utilityFunctions.setBlock(level, window_block, x, j, z)
            if j == y - 1:
                utilityFunctions.setBlock(level, window_block, x, j, z - 1)
                utilityFunctions.setBlock(level, window_block, x, j, z + 1)