Autonomous glowing builder entities step along a 5-block grid to carve out a procedural deepslate dungeon with rooms, doorways, and loot in real time.
Self-building StructuresDarkMedievalBlackCyanGoldBuilding ToolAdventure MapMap MakingArmor standsBlock building (fill/setblock/clone)Rotation math21+ commands
Watch an intricate dungeon build itself right before your eyes. Glowing spectral builders step across a 5-block grid, randomly turning left, right, or moving straight ahead to construct open-roofed deepslate brick chambers, polished tile floors, soul lanterns, and treasure chests while carving connecting doorways.
Because the builders choose random directions every few ticks and check the floor underneath before moving, the layout is different every time it generates.
/scoreboard objectives add c9_t dummy/scoreboard players set #tick c9_t 0/fill ~-17 ~-1 ~-17 ~17 ~6 ~17 air/fill ~-17 ~-1 ~-17 ~17 ~-1 ~17 polished_blackstone_bricks/fill ~-12 ~-2 ~-12 ~12 ~-2 ~12 crying_obsidian/fill ~-2 ~ ~-2 ~2 ~3 ~2 deepslate_bricks outline/fill ~-2 ~3 ~-2 ~2 ~3 ~2 air/fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 deepslate_tiles/summon armor_stand ~ ~ ~ {Tags:["c9_gen","c9_b"],Invisible:1b,NoGravity:1b,Glowing:1b,ArmorItems:[{},{},{},{id:"minecraft:sea_lantern",count:1}],Rotation:[0f,0f]}/summon armor_stand ~ ~ ~ {Tags:["c9_gen","c9_b"],Invisible:1b,NoGravity:1b,Glowing:1b,ArmorItems:[{},{},{},{id:"minecraft:shroomlight",count:1}],Rotation:[180f,0f]}/scoreboard players add #tick c9_t 1/execute as @e[tag=c9_b] at @s run particle soul_fire_flame ~ ~1.5 ~ 0.3 0.3 0.3 0.03 4 force/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s run tp @s ~ ~ ~ ~90 0/execute if score #tick c9_t matches 4.. as @e[tag=c9_b,limit=1,sort=random] at @s run tp @s ~ ~ ~ ~-90 0/execute if score #tick c9_t matches 4.. as @e[tag=c9_b,limit=1,sort=random] at @s run tp @s ~ ~ ~ ~180 0/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s if block ^ ^-2 ^5 crying_obsidian run fill ^-1 ^ ^2 ^1 ^2 ^3 air/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s if block ^ ^-2 ^5 crying_obsidian run tp @s ^ ^ ^5/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s unless block ~ ~-1 ~ deepslate_tiles run fill ~-2 ~ ~-2 ~2 ~2 ~2 deepslate_bricks outline/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s unless block ~ ~-1 ~ deepslate_tiles run fill ~-1 ~ ~-1 ~1 ~2 ~1 air/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s unless block ~ ~-1 ~ deepslate_tiles run fill ~-2 ~2 ~-2 ~2 ~2 ~2 chiseled_deepslate replace deepslate_bricks/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s unless block ~ ~-1 ~ deepslate_tiles run particle flash ~ ~2 ~ 0 0 0 0 1 force/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s unless block ~ ~-1 ~ deepslate_tiles run setblock ~ ~ ~ soul_lantern/execute if score #tick c9_t matches 4.. as @e[tag=c9_b] at @s unless block ~ ~-1 ~ deepslate_tiles run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 deepslate_tiles/execute if score #tick c9_t matches 4.. run scoreboard players set #tick c9_t 0setup #5 Places a hidden 25x25 layer of <code>crying_obsidian</code> two blocks below the surface. The builders check for this block before stepping forward so they never wander off the stage.loop #3 Every 4 ticks, rotates all builders 90 degrees, while the next two commands randomly rotate one builder back or flip it 180 degrees to create random branching paths.loop #6 Uses local coordinates <code>^ ^-2 ^5</code> to verify the spot 5 blocks ahead is inside the crying obsidian boundary, then clears a 3x3 doorway through the shared walls between the current room and the next room.loop #7 Teleports the builder 5 blocks forward along its facing direction if the boundary check succeeds.loop #8 Checks if the room already has a <code>deepslate_tiles</code> floor. If not, it builds the outer 5x5x3 deepslate brick walls, hollows the interior, caps the top rim with chiseled deepslate, and places a soul lantern.


Recorded on our own test server: 69 frames at about 9.7 fps. Our image check saw: Glowing armor stands move around a grid, progressively generating an open-roofed deepslate dungeon with soul fire particles and lanterns.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To let a player guide or spawn new dungeon branches manually, summon a builder at your position facing a cardinal direction with /summon armor_stand ~ ~ ~ {Tags:["c9_gen","c9_b"],Invisible:1b,NoGravity:1b,Rotation:[0f,0f]} (make sure you stand aligned to the 5-block grid from the center).
/kill @e[tag=c9_gen]/scoreboard objectives remove c9_t/fill ~-17 ~-2 ~-17 ~17 ~6 ~17 air/fill ~-17 ~-1 ~-17 ~17 ~-1 ~17 grass_blockThe old version checked for polished blackstone bricks at ^ ^ ^5 (air level) instead of ^ ^-1 ^5 (floor level), so the check always failed and the builders never moved. Checking the underground crying obsidian boundary at ^ ^-2 ^5 fixes both movement and stage bounds.
Expand the crying obsidian layer in setup command 5 to cover a larger area, and the builders will automatically explore the full size of that underground grid.
▶Automated Dungeon BuilderSelf-building StructuresHard26 cmds
▶Procedural Dungeon BuilderSelf-building StructuresHard26 cmds
▶Procedural Dungeon GeneratorSelf-building StructuresExpert24 cmds
▶Procedural Floating Dungeon ComplexSelf-building StructuresExpert24 cmds
▶Self-Building Dungeon MazeSelf-building StructuresHard24 cmds
▶Self-Expanding DungeonSelf-building StructuresHard20 cmds