Watch a glowing blueprint orb carve out a random dungeon of deepslate rooms, connecting hallways, soul lanterns, and lava traps right before your eyes.
Self-building StructuresMedievalDarkFireBlackOrangeCyanBuilding ToolAdventure MapMap MakingArmor standsBlock building (fill/setblock/clone)Sounds21+ commands
The Automated Dungeon Builder uses a pair of pathfinding drones to construct a complete underground-style dungeon layout on a flat surface in seconds. Starting from a central vault room, glowing architect orbs race outward across a 6-block grid, carving out chambers, punching archways through walls, and installing traps.
Each generated room has a chance to spawn either a bubbling lava hazard or a loot pedestal with soul lantern lighting. Once the maze reaches full capacity, the system resets and builds a brand-new random layout.
/scoreboard objectives add c9_t dummy/scoreboard objectives add c9_rng dummy/scoreboard objectives add c9_rooms dummy/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 polished_deepslate/fill ~-3 ~ ~-3 ~3 ~3 ~3 deepslate_bricks hollow/fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 chiseled_deepslate/setblock ~ ~ ~ chest/setblock ~ ~3 ~ glowstone/summon armor_stand ~ ~0.5 ~ {Tags:["c9_gen","c9_g1"],NoGravity:1b,Invisible:1b,Glowing:1b,ArmorItems:[{},{},{},{id:"minecraft:conduit",count:1}]}/summon armor_stand ~ ~0.5 ~ {Tags:["c9_gen","c9_g2"],NoGravity:1b,Invisible:1b,Glowing:1b,ArmorItems:[{},{},{},{id:"minecraft:sea_lantern",count:1}]}/scoreboard players add #tick c9_t 1/execute as @e[tag=c9_gen] at @s run particle soul_fire_flame ~ ~0.5 ~ 0.2 0.2 0.2 0.02 3 force/execute as @e[tag=c9_gen] at @s run particle dust{color:[0.2,0.9,1.0],scale:1.5} ~ ~0.5 ~ 0.3 0.3 0.3 0 4 force/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s store result score @s c9_rng run random value 0..3/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen,scores={c9_rng=0}] at @s run tp @s ~6 ~ ~/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen,scores={c9_rng=1}] at @s run tp @s ~-6 ~ ~/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen,scores={c9_rng=2}] at @s run tp @s ~ ~ ~6/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen,scores={c9_rng=3}] at @s run tp @s ~ ~ ~-6/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s unless block ~ ~-1 ~ polished_deepslate run tp @s ~ ~0.5 ~/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s if block ~ ~3 ~ air run fill ~-3 ~ ~-3 ~3 ~3 ~3 deepslate_bricks hollow/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s if block ~ ~2 ~ air run playsound block.deepslate_bricks.place block @a ~ ~ ~ 1 0.8/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s run fill ~-1 ~ ~-3 ~1 ~2 ~3 air/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s run fill ~-3 ~ ~-1 ~3 ~2 ~1 air/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s if score @s c9_rng matches 0..1 run setblock ~ ~-1 ~ lava/execute if score #tick c9_t matches 15.. as @e[tag=c9_gen] at @s if score @s c9_rng matches 2..3 run setblock ~ ~2 ~ soul_lantern[hanging=true]/execute if score #tick c9_t matches 15.. run scoreboard players set #tick c9_t 0loop #4 Every 15 ticks (0.75 seconds), each builder drone rolls a random number between 0 and 3 using the <code>/random</code> command and stores it in its <code>c9_rng</code> score.loop #5 Based on the random number (0, 1, 2, or 3), the builder teleports 6 blocks North, South, East, or West to snap to the next room slot on the dungeon grid.loop #9 Boundary check: if a drone steps off the 33x33 <code>polished_deepslate</code> foundation, it teleports back to the center vault room (<code>~ ~0.5 ~</code> of the stage).loop #10 If the drone lands on an unbuilt grid slot (checked by testing for air at ceiling level), it constructs a 7x4x7 hollow <code>deepslate_bricks</code> room around itself.loop #12 These two <code>/fill</code> commands carve 3x3 archways through all four walls of the room, guaranteeing that adjacent rooms connect seamlessly into hallways.loop #14 Uses the random score again to furnish the room: half the rooms get a recessed lava trap in the center floor, while the other half get a hanging soul lantern.


Recorded on our own test server: 58 frames at about 9.6 fps. Our image check saw: Glowing armor stands move across a flat stone platform, automatically generating interconnected stone brick dungeon rooms with archways and interior lava hazards.
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 trigger dungeon expansion manually with a wand instead of running on a timer, remove loop commands 1 and 16, and replace if score #tick c9_t matches 15.. with a check for a player holding a specific item or right-clicking a carrot on a stick. You can also increase the foundation size in setup command 4 to generate massive playable labyrinths.
/kill @e[tag=c9_gen]/fill ~-16 ~ ~-16 ~16 ~5 ~16 air/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_block/scoreboard objectives remove c9_t/scoreboard objectives remove c9_rng/scoreboard objectives remove c9_roomsYes! The rooms are built on a 6-block grid so that 7x7 rooms share 1-block-thick walls. If you want 9x9 rooms, change the teleport distances from 6 to 8 and expand the hollow fill command to ~-4 ~ ~-4 ~4 ~4 ~4.
Loop command 9 checks if there is a polished deepslate floor beneath the orb. When an orb steps outside the 33x33 arena, it resets back to the starting room so it never builds outside the stage.
/execute/fill/particle/playsound/random/scoreboard/setblock/summon/tp
▶Self-Building Dungeon MazeSelf-building StructuresHard24 cmds
▶Procedural Dungeon BuilderSelf-building StructuresHard26 cmds
▶Procedural Dungeon GeneratorSelf-building StructuresExpert24 cmds
▶Procedural Floating Dungeon ComplexSelf-building StructuresExpert24 cmds
▶Self-Building Procedural DungeonSelf-building StructuresExpert24 cmds
▶Self-Expanding DungeonSelf-building StructuresHard20 cmds