Procedural Dungeon Builder

Four autonomous glowing drones march outward from a central altar room, erecting deepslate dungeon walls, floors, and chambers in real time.

Java EditionComplex Contraptions & CinematicsHard26 commandsTested on a real 26.2 & 26.3 server
Four glowing drones construct a sprawling deepslate dungeon with bursts of cyan particles and sonic booms. Download the GIF Video & GIF © www.9minecraft.net

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.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /scoreboard objectives add c9_steps dummy
  3. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 minecraft:polished_deepslate
  4. /fill ~-4 ~ ~-4 ~4 ~2 ~4 minecraft:deepslate_bricks hollow
  5. /fill ~-3 ~ ~-3 ~3 ~2 ~3 minecraft:air
  6. /setblock ~ ~ ~ minecraft:enchanting_table
  7. /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}}}
  8. /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}}}
  9. /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}}}
  10. /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}}}

2. Loop - one repeating command block each (Always Active) 16 commands

  1. /scoreboard players add #tick c9_t 1
  2. /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
  3. /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
  4. /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 ~
  5. /execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run scoreboard players add @s c9_steps 1
  6. /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
  7. /execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run fill ~-1 ~ ~-1 ~1 ~2 ~1 minecraft:air
  8. /execute if score #tick c9_t matches 5.. as @e[tag=c9_gen] at @s run setblock ~ ~-1 ~ minecraft:chiseled_deepslate
  9. /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
  10. /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
  11. /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
  12. /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
  13. /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
  14. /execute if score #tick c9_t matches 5.. as @e[tag=c9_gen,scores={c9_steps=3..}] at @s run tp @s ~ ~ ~ ~90 ~
  15. /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
  16. /execute if score #tick c9_t matches 5.. run scoreboard players set #tick c9_t 0

How it works

Frames from the test run

Procedural Dungeon Builder - frame 1Procedural Dungeon Builder - frame 2Procedural Dungeon Builder - frame 3

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.

Build it in your world

  1. Find or flatten a 35x35 clear area in your world and stand right in the middle.
  2. Run all 10 setup commands in order to create the scoreboards, the deepslate foundation, the central altar room, and the 4 builder drones.
  3. Place a chain of 16 command blocks (1 Repeating Always Active followed by 15 Chain Always Active) underneath or beside the area.
  4. Paste the loop commands into the command blocks in order, making sure their execution is anchored to the stage centre.
  5. Watch the four glowing sea lantern drones march outward and build corridors and rooms automatically.
  6. Once the dungeon is as dense as you want, remove or disable the repeating command block and run <code>/kill @e[tag=c9_d]</code> to stop the drones.

Use it with real players

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.

Remove it again 5 commands

  1. /kill @e[tag=c9_d]
  2. /scoreboard objectives remove c9_t
  3. /scoreboard objectives remove c9_steps
  4. /fill ~-16 ~ ~-16 ~16 ~4 ~16 minecraft:air
  5. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 minecraft:grass_block

FAQ

Why do the drones stay inside the platform?

Before 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.

Why doesn't a drone wall off rooms it already built?

The wall-building commands use replace minecraft:air before carving the interior, so existing corridors stay open while outer walls grow around them.

Commands used

/execute/fill/particle/playsound/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides