A glowing cyan builder drone weaves across a stone plinth, raising five-block stone brick walls and carving a fresh procedural labyrinth from scratch.
Self-building StructuresTechnologyMedievalCyanBlackBuilding ToolMap MakingMini-gameBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands
A glowing cyan block_display drone hovers above the centre of a grass grid and uses a randomized growing-tree algorithm to carve a brand-new 7x7 labyrinth every time you run it. As the drone glides from cell to cell, a beam of cyan dust particles drops down onto the ground while stone brick walls and dark deepslate floors erupt beneath it.
Instead of building from a pre-made template, the system tracks unvisited cells directly on the terrain and extrudes every newly placed wall upward to five blocks tall in real time. Once the final branch seals off, the north entrance opens automatically.
/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 minecraft:smooth_stone/fill ~-14 ~-1 ~-14 ~14 ~-1 ~14 minecraft:grass_block/fill ~-2 ~0 ~-2 ~2 ~0 ~2 minecraft:stone_bricks/fill ~-1 ~0 ~-1 ~1 ~0 ~1 minecraft:air/fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:polished_deepslate/setblock ~ ~-1 ~ minecraft:sea_lantern/execute align xz positioned ~0.5 ~ ~0.5 run summon minecraft:marker ~ ~ ~ {Tags:["c9_cell","c9_fresh"]}/execute align xz positioned ~0.5 ~ ~0.5 run summon minecraft:block_display ~ ~6 ~ {Tags:["c9_drone"],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],translation:[-0.45f,-0.45f,-0.45f],scale:[0.9f,0.9f,0.9f]},teleport_duration:3}/execute as @e[tag=c9_cell] at @s unless block ~ ~-1 ~-4 minecraft:grass_block unless block ~4 ~-1 ~ minecraft:grass_block unless block ~ ~-1 ~4 minecraft:grass_block unless block ~-4 ~-1 ~ minecraft:grass_block run kill @s/execute at @e[tag=c9_drone,limit=1] run tag @e[tag=c9_cell,sort=nearest,limit=1] add c9_pick/execute as @e[tag=c9_pick,tag=c9_fresh] store result entity @s Rotation[0] float 90 run random value 0..3/tag @e[tag=c9_pick] remove c9_fresh/execute as @e[tag=c9_pick,limit=1] at @s if block ^ ^-1 ^4 minecraft:grass_block run tp @e[tag=c9_drone,limit=1] ^ ^6 ^4 ~ 0/execute as @e[tag=c9_pick,limit=1] at @s unless block ^ ^-1 ^4 minecraft:grass_block run tp @s ~ ~ ~ ~90 0/tag @e[tag=c9_pick] remove c9_pick/execute at @e[tag=c9_drone] if block ~ ~-7 ~ minecraft:grass_block run fill ~-2 ~-6 ~-2 ~2 ~-6 ~2 minecraft:stone_bricks/execute at @e[tag=c9_drone] if block ~ ~-7 ~ minecraft:grass_block run fill ^-1 ^-6 ^-2 ^1 ^-6 ^1 minecraft:air/execute at @e[tag=c9_drone] if block ~ ~-7 ~ minecraft:grass_block run summon minecraft:marker ~ ~-6 ~ {Tags:["c9_cell","c9_fresh"]}/execute at @e[tag=c9_drone] if block ~ ~-7 ~ minecraft:grass_block run fill ^-1 ^-7 ^-2 ^1 ^-7 ^1 minecraft:polished_deepslate/clone ~-14 ~0 ~-14 ~14 ~3 ~14 ~-14 ~1 ~-14 replace force/execute at @e[tag=c9_drone] if entity @e[tag=c9_cell] run particle minecraft:dust{color:[0.15,0.85,1.0],scale:1.6} ~ ~-3 ~ 0.35 2.4 0.35 0.01 16/execute unless entity @e[tag=c9_cell] run fill ~-1 ~0 ~-14 ~1 ~4 ~-14 minecraft:airsetup #2 The 29x29 <code>grass_block</code> square inside the 33x33 <code>smooth_stone</code> border acts as the unvisited cell memory, so the outer stone frame naturally keeps the generator inside bounds.setup #8 Summons the glowing cyan <code>block_display</code> drone six blocks above the centre with <code>teleport_duration:3</code> so it glides smoothly between maze cells.loop #1 Prunes any active <code>c9_cell</code> marker whose four orthogonal neighbours at distance 4 are no longer <code>grass_block</code>, shrinking the frontier automatically.loop #2 Picks the active frontier cell closest to the drone, which creates long winding corridors and hops back to the nearest open branch when hitting a dead end.loop #3 Assigns a fresh cell marker a random cardinal yaw (0, 90, 180, or 270 degrees) by multiplying <code>random value 0..3</code> by 90 directly into <code>Rotation[0]</code>.loop #9 Uses local coordinates <code>^-1 ^-6 ^-2</code> to <code>^1 ^-6 ^1</code> to clear both the 3x3 cell interior and the 3-block doorway back to the previous cell in one command.loop #12 Extrudes layers <code>y=0..3</code> upward to <code>y=1..4</code> with <code>clone ... replace force</code> every tick so newly placed walls and carved doorways shoot up to five blocks tall.


Recorded on our own test server: 63 frames at about 8.9 fps. Our image check saw: All three identical frames show a finished stone brick labyrinth with deepslate floors and a glowing cyan block hovering above it, without active movement or particle beams.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
Because the maze opens its north gate at ~ ~ ~-14 as soon as generation finishes, players can walk straight into the labyrinth and race to reach the central sea_lantern core. To generate a brand-new layout at any time, run the four removal commands followed by the eight setup commands.
/kill @e[tag=c9_cell]/kill @e[tag=c9_drone]/fill ~-16 ~0 ~-16 ~16 ~5 ~16 minecraft:air/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 minecraft:grass_blockNo. Each newly carved cell rolls a fresh random cardinal facing with <code>/random value 0..3</code>, producing a different spanning-tree maze layout on every run.
Unvisited cells are marked by <code>grass_block</code> and turn into <code>polished_deepslate</code> once carved, while the outer <code>smooth_stone</code> border stops the algorithm from wandering off the grid.
/clone/execute/fill/kill/particle/random/setblock/summon/tag/tp
▶Automated Procedural Maze BuilderSelf-building StructuresHard24 cmds
▶Automated Spire ConstructorSelf-building StructuresMedium19 cmds
▶Colossal Algorithmic Maze BuilderSelf-building StructuresHard22 cmds
▶Da Vinci Flying Machine AssemblySelf-building StructuresHard24 cmds
▶Procedural Dungeon GeneratorSelf-building StructuresExpert24 cmds
▶Autonomous Dungeon ArchitectSelf-building StructuresExpert24 cmds