Watch four glowing builders dart across a deepslate arena, constructing a 3D stone brick labyrinth around a spinning golden core in real time.
Self-building StructuresMedievalMysticBlackCyanGoldMini-gameAdventure MapBuilding ToolBlock displaysArmor standsBlock building (fill/setblock/clone)Rotation math21+ commands
The Self-Assembling Labyrinth Generator turns an empty deepslate arena into a full 3D maze right before your eyes. A spinning golden core floats in the middle while four cyan-glowing builders dart along a four-block grid, picking random directions every tick and slamming down stone brick walls, deepslate pillars, and glowing sea lantern caps.
Because each builder uses the game's random number generator every single tick, the layout is different every time you run the setup, giving you a fresh procedural dungeon arena in seconds.
/scoreboard objectives add c9_t dummy/scoreboard objectives add c9_rng dummy/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 polished_deepslate/fill ~-16 ~ ~-16 ~16 ~3 ~16 deepslate_tiles hollow/fill ~-15 ~ ~-15 ~15 ~3 ~15 air/summon block_display ~ ~4.5 ~ {Tags:["c9_e","c9_core"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:gilded_blackstone"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[2.2f,2.2f,2.2f],translation:[-1.1f,-1.1f,-1.1f]}}/summon armor_stand ~-8 ~ ~-8 {Tags:["c9_e","c9_b"],Invisible:1b,NoGravity:1b,Glowing:1b,equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/summon armor_stand ~8 ~ ~-8 {Tags:["c9_e","c9_b"],Invisible:1b,NoGravity:1b,Glowing:1b,equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/summon armor_stand ~-8 ~ ~8 {Tags:["c9_e","c9_b"],Invisible:1b,NoGravity:1b,Glowing:1b,equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/summon armor_stand ~8 ~ ~8 {Tags:["c9_e","c9_b"],Invisible:1b,NoGravity:1b,Glowing:1b,equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/scoreboard players add #tick c9_t 1/execute as @e[tag=c9_core] at @s run tp @s ~ ~ ~ ~8 ~/execute at @e[tag=c9_core] run particle flame ~ ~0.5 ~ 1.2 1.2 1.2 0.05 8/execute as @e[tag=c9_b] at @s run particle soul_fire_flame ~ ~2.5 ~ 0.3 0.6 0.3 0.03 5/execute if score #tick c9_t matches ..160 as @e[tag=c9_b] store result score @s c9_rng run random value 0..3/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=0}] at @s if block ~4 ~-1 ~ polished_deepslate run fill ~ ~ ~ ~4 ~2 ~ stone_bricks replace air/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=0}] at @s if block ~4 ~-1 ~ polished_deepslate run tp @s ~4 ~ ~/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=1}] at @s if block ~-4 ~-1 ~ polished_deepslate run fill ~-4 ~ ~ ~ ~2 ~ stone_bricks replace air/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=1}] at @s if block ~-4 ~-1 ~ polished_deepslate run tp @s ~-4 ~ ~/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=2}] at @s if block ~ ~-1 ~4 polished_deepslate run fill ~ ~ ~ ~ ~2 ~4 stone_bricks replace air/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=2}] at @s if block ~ ~-1 ~4 polished_deepslate run tp @s ~ ~ ~4/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=3}] at @s if block ~ ~-1 ~-4 polished_deepslate run fill ~ ~ ~-4 ~ ~2 ~ stone_bricks replace air/execute if score #tick c9_t matches ..160 as @e[tag=c9_b,scores={c9_rng=3}] at @s if block ~ ~-1 ~-4 polished_deepslate run tp @s ~ ~ ~-4/execute if score #tick c9_t matches ..160 as @e[tag=c9_b] at @s run setblock ~ ~3 ~ sea_lanternsetup #4 Builds the outer perimeter walls using <code>deepslate_tiles</code> and hollows out the inside in the next step, creating a 33x33 enclosed arena.setup #6 Summons an oversized <code>gilded_blackstone</code> block display entity centered above the maze with a golden glow override.loop #5 Uses <code>/random value 0..3</code> during the first 160 ticks to pick one of four cardinal directions for each builder armor stand independently.loop #6 Checks if the target grid node 4 blocks away has a <code>polished_deepslate</code> floor (keeping the builder inside the arena), then fills a 3-block tall stone brick wall segment.loop #14 Places a <code>sea_lantern</code> block on top of every grid intersection visited by a builder, lighting up the labyrinth as it forms.


Recorded on our own test server: 56 frames at about 9.2 fps. Our image check saw: A large stone brick and deepslate maze capped with sea lanterns, with a glowing golden core in the center and four outlined armor-stand builders moving along the grid.
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 carve out maze walls manually as they walk, replace @e[tag=c9_b] in the loop commands with @a[tag=maze_builder] and give yourself the tag with /tag @s add maze_builder.
/kill @e[tag=c9_e]/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_block/fill ~-16 ~ ~-16 ~16 ~6 ~16 air/scoreboard objectives remove c9_t/scoreboard objectives remove c9_rngRun the cleanup commands to clear the arena, then run the setup commands again. Since it uses /random every tick, every layout is unique.
Yes! Change the tick limit from ..160 in the loop commands to a lower number like ..80 for more open rooms, or ..240 for tighter corridors.
▶Automated Spire ConstructorSelf-building StructuresMedium19 cmds
▶Colossal Algorithmic Maze BuilderSelf-building StructuresHard22 cmds
▶Instant Village GeneratorSelf-building StructuresHard24 cmds
▶Procedural Dungeon BuilderSelf-building StructuresHard26 cmds
▶Procedural Floating Dungeon ComplexSelf-building StructuresExpert24 cmds
▶Procedural Tower GenesisSelf-building StructuresMedium24 cmds