Four autonomous glowing drones march outward from a central altar room, erecting deepslate dungeon walls, floors, and chambers in real time.
Self-building StructuresDarkMedievalMysticBlackBlueCyanBuilding ToolMap MakingAdventure MapArmor standsSummoned mobsBlock building (fill/setblock/clone)SoundsRotation math21+ commands
The Procedural Dungeon Builder deploys four autonomous builder drones that construct a sprawling deepslate dungeon across a flat area. Starting from a central altar room, the glowing drones march outward in four directions, erecting walls, laying tiled floors, and intermittently branching off to build side chambers and hallways.
Each step sends out bursts of cyan dust, soul flames, and sonic booms when new rooms are formed, allowing you to watch a dark dungeon layout generate before your eyes.
/scoreboard objectives add c9_t dummy/scoreboard objectives add c9_steps dummy/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 minecraft:polished_deepslate/fill ~-4 ~ ~-4 ~4 ~2 ~4 minecraft:deepslate_bricks hollow/fill ~-3 ~ ~-3 ~3 ~2 ~3 minecraft:air/setblock ~ ~ ~ minecraft:enchanting_table/summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_gen","c9_d"],NoGravity:1b,Invisible:1b,Glowing:1b,Rotation:[0f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_gen","c9_d"],NoGravity:1b,Invisible:1b,Glowing:1b,Rotation:[90f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_gen","c9_d"],NoGravity:1b,Invisible:1b,Glowing:1b,Rotation:[180f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_gen","c9_d"],NoGravity:1b,Invisible:1b,Glowing:1b,Rotation:[270f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1}}}/scoreboard players add #tick c9_t 1/execute as @e[tag=c9_gen] at @s run particle minecraft:soul_fire_flame ~ ~1.5 ~ 0.2 0.2 0.2 0.03 2 force/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s if block ^ ^-1 ^3 minecraft:polished_deepslate run tp @s ^ ^ ^2/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s unless block ^ ^-1 ^3 minecraft:polished_deepslate run tp @s ~ ~ ~ ~180 ~/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run scoreboard players add @s c9_steps 1/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run fill ~-2 ~ ~-2 ~2 ~2 ~2 minecraft:deepslate_bricks replace minecraft:air/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run fill ~-1 ~ ~-1 ~1 ~2 ~1 minecraft:air/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run setblock ~ ~-1 ~ minecraft:chiseled_deepslate/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run particle minecraft:dust{color:[0.2,0.9,1.0],scale:2.0} ~ ~1.5 ~ 0.8 0.8 0.8 0 20 force/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run playsound minecraft:block.deepslate_bricks.place block @a ~ ~ ~ 0.6 1.2/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen,scores={c9_steps=3..}] at @s run fill ~-3 ~ ~-3 ~3 ~2 ~3 minecraft:deepslate_bricks replace minecraft:air/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen,scores={c9_steps=3..}] at @s run fill ~-2 ~ ~-2 ~2 ~2 ~2 minecraft:air/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen,scores={c9_steps=3..}] at @s run particle minecraft:sonic_boom ~ ~1.5 ~ 0 0 0 0 1 force/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen,scores={c9_steps=3..}] at @s run tp @s ~ ~ ~ ~90 ~/execute if score #tick c9_t matches 5.. as @e[tag=c9_gen,scores={c9_steps=3..}] run scoreboard players set @s c9_steps 0/execute if score #tick c9_t matches 5.. run scoreboard players set #tick c9_t 0setup #3 Lays down a 33x33 foundation of <code>polished_deepslate</code> which acts as both the dungeon floor and the boundary marker for the builder drones.setup #7 Summons the first of four glowing armor stand drones wearing a <code>sea_lantern</code> on its head, each facing a different cardinal direction.loop #3 Every 5 ticks, each drone checks if there is still <code>polished_deepslate</code> floor ahead of it, and if so, steps forward 2 blocks using local coordinates <code>^ ^ ^2</code>.loop #6 Places outer <code>deepslate_bricks</code> walls around the drone only where air currently exists, preventing drones from closing off corridors they already carved.loop #7 Carves out the 3x3 interior corridor space behind and around the drone as it moves.loop #11 Every 3 steps, the drone expands its build area to construct a larger room, fires a <code>sonic_boom</code> particle, and rotates 90 degrees to branch the dungeon.


Recorded on our own test server: 50 frames at about 8.3 fps. Our image check saw: Four glowing builder drones move outward through a deepslate dungeon structure, carving out rooms and corridors while emitting blue dust, soul flames, and sonic boom rings.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To trigger a dungeon builder drone from a dropped item or spell, summon one drone at the player's location with /execute at @p run summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_gen","c9_d"],NoGravity:1b,Invisible:1b,Glowing:1b,equipment:{head:{id:"minecraft:sea_lantern",count:1}}} after laying a polished_deepslate floor where you want it to build.
/kill @e[tag=c9_d]/scoreboard objectives remove c9_t/scoreboard objectives remove c9_steps/fill ~-16 ~ ~-16 ~16 ~4 ~16 minecraft:air/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 minecraft:grass_blockBefore stepping forward, each drone checks for polished deepslate at ^ ^-1 ^3. When it reaches the edge of the deepslate floor, it turns 180 degrees back toward the interior.
The wall-building commands use replace minecraft:air before carving the interior, so existing corridors stay open while outer walls grow around them.
/execute/fill/particle/playsound/scoreboard/setblock/summon/tp
▶Procedural Floating Dungeon ComplexSelf-building StructuresExpert24 cmds
▶Self-Assembling Dungeon ComplexSelf-building StructuresExpert24 cmds
▶Self-Assembling LabyrinthSelf-building StructuresMedium22 cmds
▶Self-Building Procedural DungeonSelf-building StructuresHard24 cmds
▶Self-Carving LabyrinthSelf-building StructuresHard24 cmds
▶Self-Generating Dungeon MazeSelf-building StructuresExpert24 cmds