Self-Building Procedural Dungeon

Four glowing builder spirits march outward from a central golden sanctum, automatically constructing open deepslate corridors, pillars, and treasure chambers.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
Glowing spirits construct a procedural deepslate brick dungeon with sea lantern rooms and a central conduit core. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresDarkMedievalMysticGoldCyanBlackBuilding ToolAdventure MapMap MakingItem displaysArmor standsBlock building (fill/setblock/clone)Rotation math21+ commands

Building a massive dungeon by hand takes hours, so why not let four glowing builder spirits construct one for you? In this command creation, a central sanctum with a golden treasure pedestal and a giant spinning conduit core materializes on an empty grid while four spectral builders march outward in every direction.

As the builders glide along the pathways, they raise deepslate brick corridors, carve out archways, light the halls with sea lanterns, and finish by assembling four glowing outer treasure chambers before resetting the cycle to build again.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 deepslate_tiles
  3. /fill ~-16 ~-1 ~-2 ~16 ~-1 ~2 polished_deepslate
  4. /fill ~-2 ~-1 ~-16 ~2 ~-1 ~16 polished_deepslate
  5. /summon armor_stand ~ ~ ~ {Tags:["c9_core"],Invisible:1b,NoGravity:1b,Marker:1b}
  6. /summon item_display ~ ~4.5 ~ {Tags:["c9_core","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],translation:[0f,0f,0f],scale:[2.5f,2.5f,2.5f]}}
  7. /summon armor_stand ~ ~ ~ {Tags:["c9_b","c9_ns"],NoGravity:1b,Glowing:1b,ShowArms:1b,Rotation:[180f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1},chest:{id:"minecraft:diamond_chestplate",count:1},mainhand:{id:"minecraft:golden_pickaxe",count:1}}}
  8. /summon armor_stand ~ ~ ~ {Tags:["c9_b","c9_ns"],NoGravity:1b,Glowing:1b,ShowArms:1b,Rotation:[0f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1},chest:{id:"minecraft:diamond_chestplate",count:1},mainhand:{id:"minecraft:golden_pickaxe",count:1}}}
  9. /summon armor_stand ~ ~ ~ {Tags:["c9_b","c9_ew"],NoGravity:1b,Glowing:1b,ShowArms:1b,Rotation:[-90f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1},chest:{id:"minecraft:diamond_chestplate",count:1},mainhand:{id:"minecraft:golden_pickaxe",count:1}}}
  10. /summon armor_stand ~ ~ ~ {Tags:["c9_b","c9_ew"],NoGravity:1b,Glowing:1b,ShowArms:1b,Rotation:[90f,0f],equipment:{head:{id:"minecraft:sea_lantern",count:1},chest:{id:"minecraft:diamond_chestplate",count:1},mainhand:{id:"minecraft:golden_pickaxe",count:1}}}

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

  1. /execute as @e[tag=c9_core,type=armor_stand] run scoreboard players add @s c9_t 1
  2. /execute as @e[tag=c9_orb] at @s run tp @s ~ ~ ~ ~8 ~
  3. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=1}] at @s run fill ~-15 ~ ~-15 ~15 ~6 ~15 air
  4. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=2}] at @s run tp @e[tag=c9_b] ~ ~ ~
  5. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=5}] at @s run fill ~-3 ~ ~-3 ~3 ~3 ~3 deepslate_bricks hollow
  6. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=8}] at @s run fill ~-1 ~ ~-3 ~1 ~2 ~3 air
  7. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=10}] at @s run fill ~-3 ~ ~-1 ~3 ~2 ~1 air
  8. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=12}] at @s run fill ~-1 ~ ~-1 ~1 ~ ~1 gold_block
  9. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=15..66}] run execute as @e[tag=c9_b] at @s run tp @s ^ ^ ^0.25
  10. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=28..56}] run execute at @e[tag=c9_ns] run fill ~-2 ~ ~ ~2 ~2 ~ deepslate_bricks
  11. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=28..56}] run execute at @e[tag=c9_ew] run fill ~ ~ ~-2 ~ ~2 ~2 deepslate_bricks
  12. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=28..67}] run execute at @e[tag=c9_b] run fill ~-1 ~ ~-1 ~1 ~2 ~1 air
  13. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=67}] run execute at @e[tag=c9_b] run fill ~-2 ~ ~-2 ~2 ~2 ~2 sea_lantern hollow
  14. /execute as @e[tag=c9_core,type=armor_stand,scores={c9_t=1..115}] at @e[tag=c9_b] run particle soul_fire_flame ~ ~1.2 ~ 0.6 0.8 0.6 0.04 6 force

How it works

Frames from the test run

Self-Building Procedural Dungeon - frame 1Self-Building Procedural Dungeon - frame 2Self-Building Procedural Dungeon - frame 3

Recorded on our own test server: 59 frames at about 9.7 fps. Our image check saw: A deepslate brick structure with four branching corridors, sea lantern rooms, and glowing outlined entities at the center and ends.

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 a flat open area of at least 35x35 blocks and stand in the exact center.
  2. Run each of the 10 setup commands in chat to lay down the deepslate foundation, central core, and four builder spirits.
  3. Place a column or line of 14 Repeating Command Blocks set to Always Active near the center of the stage.
  4. Paste one loop command into each repeating command block in order from 1 to 14.
  5. Watch the central sanctum rise around the golden core and the four builders march outward to construct the corridors and outer chambers.
  6. To replay the construction animation at any time, run <code>/scoreboard players set @e[tag=c9_core] c9_t 0</code> in chat.

Use it with real players

To trigger a dungeon build around yourself in survival or adventure mode, replace @e[tag=c9_core,type=armor_stand] in the setup and loop commands with @a[tag=c9_actor], and summon the four builder armor stands at your position whenever you drop or hold a specific trigger item.

Remove it again 5 commands

  1. /fill ~-16 ~ ~-16 ~16 ~10 ~16 air
  2. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_block
  3. /kill @e[tag=c9_core]
  4. /kill @e[tag=c9_b]
  5. /scoreboard objectives remove c9_t

FAQ

Why did the previous version look static or fail to build the North and West corridors?

Chaining <code>at @e[tag=c9_n] at @e[tag=c9_s]</code> in a single command only executes at the last entity in the chain. Grouping North-South builders under a single tag (<code>c9_ns</code>) and East-West builders under <code>c9_ew</code> makes all four corridors build simultaneously, and removing the roof slabs lets you see inside the hallways from above.

How can I make the corridors longer?

Increase the upper score limit on loop commands 9, 10, 11, and 12 (for example from <code>66</code> to <code>90</code>) and shift the outer chamber tick in command 13 to match the new end tick.

Commands used

/execute/fill/particle/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides