Turn a flat stage into an automated dungeon factory where a glowing conduit drone carves out random multi-room stone brick layouts in real time.
Self-building StructuresMedievalTechnologyDarkCyanBlueBlackBuilding ToolMap MakingAdventure MapItem displaysSmooth animation (interpolation)Block building (fill/setblock/clone)21+ commands
Building dungeons by hand takes hours, so why not let an algorithm do the heavy lifting? This command creation turns a flat platform into an automated dungeon factory. Every few seconds, the stage wipes clean onto a dark slate floor and deploys a glowing architectural drone at the center.
The drone rapidly steps across a grid in random directions, building stone brick chambers, punching doorways between connected rooms, and dropping sea lanterns and spawners along its path. Because the rooms have an open-roof cutaway design, you can watch the entire labyrinth assemble itself from above.
/scoreboard objectives add c9_t dummy/summon marker ~ ~ ~ {Tags:["c9_gen","c9_ctrl"]}/scoreboard players set @e[tag=c9_ctrl] c9_t 0/summon marker ~5 ~ ~ {Tags:["c9_gen","c9_dir"]}/summon marker ~-5 ~ ~ {Tags:["c9_gen","c9_dir"]}/summon marker ~ ~ ~5 {Tags:["c9_gen","c9_dir"]}/summon marker ~ ~ ~-5 {Tags:["c9_gen","c9_dir"]}/summon item_display ~ ~2.5 ~ {Tags:["c9_gen","c9_orb"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:conduit",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[2.0f,2.0f,2.0f],translation:[0f,0f,0f]},teleport_duration:2}/scoreboard players add @e[tag=c9_ctrl] c9_t 1/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 1 run fill ~-16 ~ ~-16 ~16 ~5 ~16 air/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 1 run fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 deepslate_tiles/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 2 run tp @e[tag=c9_orb] ~ ~2.5 ~/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 2 run fill ~-3 ~-1 ~-3 ~3 ~2 ~3 stone_bricks/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 2 run fill ~-2 ~ ~-2 ~2 ~2 ~2 air/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 2 run setblock ~ ~-1 ~ sea_lantern/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 5..85 run tag @e[tag=c9_dir,sort=random,limit=1] add c9_pick/execute at @e[tag=c9_orb] at @e[tag=c9_pick,limit=1] run summon marker ~ ~ ~ {Tags:["c9_gen","c9_step"]}/execute at @e[tag=c9_step] if block ~ ~-3 ~ deepslate_tiles run fill ~-3 ~-3 ~-3 ~3 ~ ~3 stone_bricks/execute at @e[tag=c9_step] if block ~ ~-3 ~ stone_bricks positioned ~ ~-2.5 ~ run fill ~-2 ~ ~-2 ~2 ~2 ~2 air/execute at @e[tag=c9_step] if block ~ ~-3 ~ stone_bricks run tp @e[tag=c9_orb] ~ ~ ~/execute at @e[tag=c9_orb] run particle soul_fire_flame ~ ~ ~ 0.6 0.6 0.6 0.05 4 force/tag @e[tag=c9_pick] remove c9_pick/kill @e[tag=c9_step]/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 115 run scoreboard players set @e[tag=c9_ctrl] c9_t 0setup #4 Four direction markers are placed 5 blocks away from the center on the X and Z axes to act as compass vectors for the random walker.setup #8 Summons the glowing conduit display drone with a teleport_duration of 2 ticks so it glides smoothly from room to room.loop #8 During the active building phase (ticks 5 to 85), one of the four direction vectors is chosen at random every tick.loop #9 Chains two execute contexts (at the drone, then at the chosen direction offset) to place a temporary step marker 5 blocks away from the drone's current position.loop #10 Checks if the target spot is still inside the deepslate tile floor boundary. If it is, it builds a 7x3x7 stone brick room shell.loop #11 Carves out the 5x3x5 interior of the room. Because rooms are spaced 5 blocks apart and have 7-block footprints, carving the interior automatically opens doorways between adjacent rooms.


Recorded on our own test server: 57 frames at about 9.4 fps. Our image check saw: A dark slate platform with a single stone brick room in the center containing a glowing cyan drone emitting blue flame particles.
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 build manually whenever a player drops a compass instead of looping forever, remove the last loop command (which resets c9_t at 115) and replace it with: /execute as @e[type=item,nbt={Item:{id:"minecraft:compass"}}] run scoreboard players set @e[tag=c9_ctrl] c9_t 0 followed by killing the dropped compass item.
/kill @e[tag=c9_gen]/scoreboard objectives remove c9_t/fill ~-16 ~ ~-16 ~16 ~5 ~16 air/fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_blockThe generator builds cutaway walls 3 blocks high so you can easily look down inside the dungeon rooms as they generate. You can add a ceiling by increasing the Y height in loop command 10 and keeping the top layer intact in command 11.
Before building a room or moving the drone, loop command 10 checks if there is a deepslate_tiles block directly underneath the target step. Since the deepslate floor is only 33x33 blocks wide, the drone naturally refuses to step off the edge.
/execute/fill/kill/particle/scoreboard/setblock/summon/tag/tp
▶Automated Dungeon BuilderSelf-building StructuresHard26 cmds
▶Automated Procedural Maze BuilderSelf-building StructuresHard24 cmds
▶Automated Spire ConstructorSelf-building StructuresMedium19 cmds
▶Colossal Algorithmic Maze BuilderSelf-building StructuresHard22 cmds
▶Da Vinci Flying Machine AssemblySelf-building StructuresHard24 cmds
▶Live Maze SculptorSelf-building StructuresHard24 cmds