Self-Building Procedural Labyrinth

Watch four glowing cyan laser nodes traverse a dark tiled floor, automatically constructing an intricate monochrome office labyrinth with lit ceilings.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
Four glowing cyan pillars automatically construct a monochrome labyrinth with glass ceilings and sea lanterns. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresTechnologyWhiteBlackCyanMini-gameMap MakingBuilding ToolBlock displaysBlock building (fill/setblock/clone)Rotation math21+ commands

This command creation generates a monochrome office labyrinth out of thin air. Starting from a glowing sea lantern core at the center, four tall cyan laser pillars glide outward across a dark deepslate floor, carving out white concrete hallways, gray support pillars, and glass ceilings embedded with lights.

Each builder node checks the blocks around it as it moves, turning corners automatically to spiral outward and fill the arena with an interconnected grid of corridors.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard players set #tick c9_timer 0
  3. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 deepslate_tiles
  4. /fill ~-16 ~ ~-16 ~16 ~3 ~16 cyan_concrete outline
  5. /fill ~-15 ~ ~-15 ~15 ~5 ~15 air
  6. /fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 sea_lantern
  7. /summon block_display ~ ~ ~-3 {Tags:["c9_ent","c9_node"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.2f,4.5f,1.2f],translation:[-0.6f,0f,-0.6f]},Rotation:[180f,0f]}
  8. /summon block_display ~3 ~ ~ {Tags:["c9_ent","c9_node"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.2f,4.5f,1.2f],translation:[-0.6f,0f,-0.6f]},Rotation:[270f,0f]}
  9. /summon block_display ~ ~ ~3 {Tags:["c9_ent","c9_node"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.2f,4.5f,1.2f],translation:[-0.6f,0f,-0.6f]},Rotation:[0f,0f]}
  10. /summon block_display ~-3 ~ ~ {Tags:["c9_ent","c9_node"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.2f,4.5f,1.2f],translation:[-0.6f,0f,-0.6f]},Rotation:[90f,0f]}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /scoreboard players add #tick c9_timer 1
  2. /execute at @e[tag=c9_node] run particle end_rod ~ ~4.2 ~ 0.3 0.2 0.3 0.05 3 force
  3. /execute if score #tick c9_timer matches 3.. as @e[tag=c9_node] at @s if block ^ ^ ^3 air run tp @s ^ ^ ^3
  4. /execute if score #tick c9_timer matches 3.. as @e[tag=c9_node] at @s if block ^3 ^ ^ air run tp @s ~ ~ ~ ~-90 ~
  5. /execute if score #tick c9_timer matches 3.. as @e[tag=c9_node] at @s unless block ^ ^ ^3 air run tp @s ~ ~ ~ ~90 ~
  6. /execute if score #tick c9_timer matches 3.. as @e[tag=c9_node] at @s unless block ^ ^ ^3 air run tp @s ^ ^ ^3 ~90 ~
  7. /execute if score #tick c9_timer matches 3.. at @e[tag=c9_node] run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 smooth_quartz
  8. /execute if score #tick c9_timer matches 3.. at @e[tag=c9_node] run fill ^-2 ^ ^-1 ^-2 ^3 ^1 white_concrete replace air
  9. /execute if score #tick c9_timer matches 3.. at @e[tag=c9_node] run fill ^2 ^ ^-1 ^2 ^3 ^1 light_gray_concrete replace air
  10. /execute if score #tick c9_timer matches 3.. at @e[tag=c9_node] run fill ^-2 ^ ^2 ^-2 ^3 ^2 gray_concrete replace air
  11. /execute if score #tick c9_timer matches 3.. at @e[tag=c9_node] run fill ~-1 ~4 ~-1 ~1 ~4 ~1 light_blue_stained_glass
  12. /execute if score #tick c9_timer matches 3.. at @e[tag=c9_node] run setblock ~ ~4 ~ sea_lantern
  13. /execute if score #tick c9_timer matches 3.. at @e[tag=c9_node] run particle cloud ~ ~2 ~ 0.8 1 0.8 0.05 15 force
  14. /execute if score #tick c9_timer matches 3.. run scoreboard players set #tick c9_timer 0

How it works

Frames from the test run

Self-Building Procedural Labyrinth - frame 1Self-Building Procedural Labyrinth - frame 2Self-Building Procedural Labyrinth - frame 3

Recorded on our own test server: 51 frames at about 8.4 fps. Our image check saw: Four glowing cyan pillars move across a dark deepslate floor, generating a labyrinth of white walls, gray pillars, and glass ceilings with sea lanterns.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Stand at the center of a flat open area with at least 18 blocks of clearance in every direction.
  2. Run all 10 setup commands in order in your chat or a single-use impulse command block chain to build the base floor and spawn the four laser nodes.
  3. Place 14 command blocks in a connected chain starting near the center.
  4. Set the first block to Repeating, Unconditional, Always Active, and the remaining 13 blocks to Chain, Unconditional, Always Active.
  5. Paste the 14 loop commands in order into the chain (making sure coordinates are centered on the arena or wrapped with execute positioned at the center).
  6. Watch from above as the four cyan pillars construct the labyrinth corridors automatically.

Use it with real players

To let a player draw corridors manually instead of using autonomous nodes, replace @e[tag=c9_node] in loop commands 7 through 13 with @a[tag=labyrinth_builder]. Give yourself the tag with /tag @s add labyrinth_builder, and new office hallways will materialize behind you wherever you walk.

Remove it again 4 commands

  1. /kill @e[tag=c9_ent]
  2. /scoreboard objectives remove c9_timer
  3. /fill ~-16 ~ ~-16 ~16 ~6 ~16 air
  4. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_block

FAQ

Why do the builder nodes use local caret (^) coordinates?

Caret coordinates place blocks relative to the direction each node is facing, allowing the exact same fill command to build left and right walls whether the node is heading north, south, east, or west.

Can I make the labyrinth build faster or slower?

Yes! Change the number 3 in <code>matches 3..</code> across the loop commands to <code>1..</code> for instant construction, or <code>10..</code> for a slower step-by-step build.

Commands used

/execute/fill/particle/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides