Glowing builder cursors zip across a solid deepslate monolith, carving out a complex winding maze completely by themselves with particles and sound.
Self-building StructuresTechnologyDarkCyanBlackWhiteBuilding ToolMap MakingMini-gameBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands
Watch a solid block of dark deepslate bricks transform into a glowing labyrinth right before your eyes. Four autonomous sea-lantern cursors zip across the grid in real time, hunting for uncarved stone and hollowing out winding corridors while leaving a trail of electric sparks and lantern-lit floors.
This creation uses a decentralized randomized breadth-first search algorithm built entirely with vanilla commands. When a cursor hits a dead end, it automatically teleports to a previously carved junction to branch out until the entire maze is complete.
/scoreboard objectives add c9_tick dummy/fill ~-12 ~-1 ~-12 ~12 ~-1 ~12 minecraft:polished_deepslate/fill ~-11 ~ ~-11 ~11 ~2 ~11 minecraft:deepslate_bricks/fill ~-10 ~ ~-10 ~-10 ~2 ~-10 minecraft:air/setblock ~-10 ~-1 ~-10 minecraft:ochre_froglight/summon minecraft:marker ~-10 ~ ~-10 {Tags:["c9_sim","c9_node"]}/summon minecraft:block_display ~-10 ~ ~-10 {Tags:["c9_sim","c9_carver"],Glowing:1b,glow_color_override:65535,teleport_duration:2,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,2.8f,0.8f],translation:[-0.4f,0f,-0.4f]}}/summon minecraft:block_display ~-10 ~ ~-10 {Tags:["c9_sim","c9_carver"],Glowing:1b,glow_color_override:16755200,teleport_duration:2,block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,2.8f,0.8f],translation:[-0.4f,0f,-0.4f]}}/summon minecraft:block_display ~-10 ~ ~-10 {Tags:["c9_sim","c9_carver"],Glowing:1b,glow_color_override:65535,teleport_duration:2,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,2.8f,0.8f],translation:[-0.4f,0f,-0.4f]}}/summon minecraft:block_display ~-10 ~ ~-10 {Tags:["c9_sim","c9_carver"],Glowing:1b,glow_color_override:16755200,teleport_duration:2,block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,2.8f,0.8f],translation:[-0.4f,0f,-0.4f]}}/scoreboard players add #timer c9_tick 1/execute as @e[tag=c9_carver] at @s run particle minecraft:electric_spark ~ ~1.5 ~ 0.3 0.8 0.3 0.05 4 force/execute if score #timer c9_tick matches 2.. run tag @e[tag=c9_carver] remove c9_moved/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver] at @s run tp @s ~ ~ ~ ~90 ~/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver,limit=1,sort=random] at @s run tp @s ~ ~ ~ ~180 ~/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver,tag=!c9_moved] at @s positioned ^ ^ ^2 if block ~ ~-1 ~ minecraft:polished_deepslate if block ~ ~ ~ minecraft:deepslate_bricks run summon minecraft:marker ~ ~ ~ {Tags:["c9_sim","c9_node","c9_step"]}/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver,tag=!c9_moved] at @s if entity @e[tag=c9_step,distance=..2.5] run fill ^ ^ ^1 ^ ^2 ^2 minecraft:air/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver,tag=!c9_moved] at @s if entity @e[tag=c9_step,distance=..2.5] run setblock ^ ^-1 ^1 minecraft:sea_lantern/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver,tag=!c9_moved] at @s if entity @e[tag=c9_step,distance=..2.5] run tp @s ^ ^ ^2/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver,tag=!c9_moved] at @s if entity @e[tag=c9_step,distance=..0.5] run tag @s add c9_moved/execute if score #timer c9_tick matches 2.. at @e[tag=c9_step] run setblock ~ ~-1 ~ minecraft:ochre_froglight/execute if score #timer c9_tick matches 2.. at @e[tag=c9_step] run particle minecraft:soul_fire_flame ~ ~1 ~ 0.2 0.8 0.2 0.05 15 force/execute if score #timer c9_tick matches 2.. as @e[tag=c9_carver,tag=!c9_moved] at @s run tp @s @e[tag=c9_node,limit=1,sort=random]/execute if score #timer c9_tick matches 2.. run tag @e[tag=c9_step] remove c9_step/execute if score #timer c9_tick matches 2.. run scoreboard players set #timer c9_tick 0setup #3 Builds the solid 23x3x23 deepslate brick monolith that the cursors will carve into a 11x11 grid of maze cells.setup #7 Summons the glowing sea lantern and shroomlight block_display cursors with a teleport_duration of 2 so they smoothly glide between grid cells.loop #6 Looks 2 blocks ahead of each cursor. If the block is inside thepolished_deepslate floor boundary and is still uncarved deepslate_bricks, it places a c9_step marker to claim that cell.loop #7 If a cursor successfully claimed the cell 2 blocks ahead, it carves out both the intermediate wall (^ ^ ^1) and the target cell (^ ^ ^2) using local caret coordinates.loop #13 When a cursor faces a wall or an already carved passage, it fails to move and instead teleports to a random previously placed c9_node marker to branch out from a new junction.


Recorded on our own test server: 68 frames at about 9.7 fps. Our image check saw: Four glowing outlined cursors move across a large block of deepslate bricks, actively carving out maze corridors with sea-lantern floors and particle effects.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To let players trigger a fresh maze rewrite with an item, remove the setup monolith fills and instead run them through an execute at @a[nbt={SelectedItem:{id:"minecraft:golden_pickaxe"}}] detector, centering the maze around the player whenever they drop the pickaxe.
/kill @e[tag=c9_sim]/scoreboard objectives remove c9_tick/fill ~-12 ~ ~-12 ~12 ~3 ~12 minecraft:air/fill ~-12 ~-1 ~-12 ~12 ~-1 ~12 minecraft:grass_blockEach cursor checks two blocks ahead on an odd-numbered coordinate grid and only carves if the target cell is still solid deepslate bricks, which guarantees a perfect spanning tree without closed loops.
Run the remove commands to clear the markers and blocks, then run the setup commands again. Because the cursors rotate and branch randomly, every single run produces a different maze.
▶Live Maze SculptorSelf-building StructuresHard24 cmds
▶Procedural Dungeon GeneratorSelf-building StructuresExpert24 cmds
▶Glitching Farlands Wall GeneratorSelf-building StructuresMedium24 cmds
▶Autonomous Labyrinth WeaverSelf-building StructuresHard24 cmds
▶Self-Carving Labyrinth GeneratorSelf-building StructuresHard25 cmds
▶Mechanical Spider Silk Web SpinnerSelf-building StructuresHard24 cmds