Commit 4b8121e1 authored by Craige McWhirter's avatar Craige McWhirter

Merge branch 'dome_base' into 'master'

Dome base

See merge request !5
parents 0910239d 59cd0e35
Pipeline #129 failed with stage
in 29 seconds
......@@ -15,9 +15,10 @@ POS = MC.player.getTilePos()
# Set the sphere radius
RADIUS = 21
DOME = block.GLASS.id
# Set the blocks to use
DOME = block.GLASS.id
DOME_WALL = block.QUARTZ_BLOCK.id
DOME_GROUND = block.GRASS.id
AIR = block.AIR.id
GLASS = block.GLASS.id
......@@ -45,15 +46,23 @@ def build_dome():
# Build the upper hemisphere
for y_plot in range(0, RADIUS):
plot = x_plot ** 2 + y_plot ** 2 + z_plot ** 2
# Clear the space with an air block
if plot < (RADIUS - 1) ** 2:
MC.setBlock(
POS.x + x_plot, POS.y + y_plot, POS.z + z_plot, AIR
)
# Build the base of the dome
if y_plot < 3:
if plot > (RADIUS - 1) ** 2 and plot < RADIUS ** 2:
MC.setBlock(
POS.x + x_plot, POS.y + y_plot, POS.z + z_plot,
DOME_WALL
)
# Build the dome
elif plot > (RADIUS - 1) ** 2 and plot < RADIUS ** 2:
MC.setBlock(
POS.x + x_plot, POS.y + y_plot, POS.z + z_plot, GLASS
POS.x + x_plot, POS.y + y_plot, POS.z + z_plot,
GLASS
)
# Clear the space with an air block
elif plot < (RADIUS - 1) ** 2:
MC.setBlock(
POS.x + x_plot, POS.y + y_plot, POS.z + z_plot, AIR
)
......
......@@ -96,3 +96,5 @@ MELON = Block(103)
FENCE_GATE = Block(107)
GLOWING_OBSIDIAN = Block(246)
NETHER_REACTOR_CORE = Block(247)
QUARTZ_BLOCK = Block(155)
SEA_LANTERN = Block(169)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment