Self-Building Dungeon Maze

Summon four glowing builder orbs that carve an interlocking deepslate dungeon maze, hang soul lanterns, and arm fire traps around a central loot vault.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
Glowing builder entities carve out a deepslate dungeon maze around a rotating central beacon. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresDarkMedievalFireBlackCyanOrangeAdventure MapBuilding ToolMini-gameItem displaysArmor standsBlock building (fill/setblock/clone)Glowing outlinesRotation math21+ commands

Building a dungeon by hand takes hours, so why not let magic do the work? This command creation summons four glowing builder orbs that zip across a dark foundation, carving out interlocking deepslate corridors, lighting up soul lanterns, and arming fire traps right in front of your eyes.

At the heart of the labyrinth sits a rotating crystal beacon guarding a gilded treasure chamber. Every corridor is carved live with bursts of soul fire and flying stone debris, visible in full view from start to finish.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /scoreboard players set #tick c9_t 0
  3. /fill ~-14 ~-1 ~-14 ~14 ~-1 ~14 polished_deepslate
  4. /fill ~-14 ~ ~-14 ~14 ~2 ~14 deepslate_bricks
  5. /fill ~-15 ~-1 ~-15 ~15 ~2 ~15 chiseled_deepslate outline
  6. /fill ~-14 ~3 ~-14 ~14 ~3 ~14 air
  7. /fill ~-3 ~ ~-3 ~3 ~2 ~3 air
  8. /fill ~-3 ~-1 ~-3 ~3 ~-1 ~3 gilded_blackstone
  9. /summon item_display ~ ~1.8 ~ {Tags:["c9_m","c9_core"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:beacon"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.2f,1.2f,1.2f]}}
  10. /summon armor_stand ~-8 ~ ~-8 {Tags:["c9_m","c9_b","c9_b1"],NoGravity:1b,Invisible:1b,Glowing:1b,equipment:{head:{id:"minecraft:sea_lantern",count:1}}}

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

  1. /scoreboard players add #tick c9_t 1
  2. /execute if score #tick c9_t matches 1 run summon armor_stand ~8 ~ ~-8 {Tags:["c9_m","c9_b","c9_b2"],NoGravity:1b,Invisible:1b,Glowing:1b,Rotation:[90f,0f],equipment:{head:{id:"minecraft:shroomlight",count:1}}}
  3. /execute if score #tick c9_t matches 1 run summon armor_stand ~8 ~ ~8 {Tags:["c9_m","c9_b","c9_b3"],NoGravity:1b,Invisible:1b,Glowing:1b,Rotation:[180f,0f],equipment:{head:{id:"minecraft:ochre_froglight",count:1}}}
  4. /execute if score #tick c9_t matches 1 run summon armor_stand ~-8 ~ ~8 {Tags:["c9_m","c9_b","c9_b4"],NoGravity:1b,Invisible:1b,Glowing:1b,Rotation:[270f,0f],equipment:{head:{id:"minecraft:verdant_froglight",count:1}}}
  5. /execute if score #tick c9_t matches 1 run setblock ~ ~ ~ chest[facing=south]{Items:[{Slot:13b,id:"minecraft:enchanted_golden_apple",count:3}]}
  6. /execute if score #tick c9_t matches 2..130 as @e[tag=c9_b] at @s run tp @s ~ ~ ~ ~90 ~
  7. /execute if score #tick c9_t matches 2..130 as @e[tag=c9_b] at @s if block ^ ^ ^4 deepslate_bricks run fill ^-1 ^ ^1 ^1 ^2 ^4 air
  8. /execute if score #tick c9_t matches 2..130 as @e[tag=c9_b] at @s if block ^ ^ ^4 deepslate_bricks run particle block{block_state:{Name:"minecraft:deepslate_bricks"}} ^ ^1.5 ^2 0.8 0.8 0.8 0.15 35
  9. /execute if score #tick c9_t matches 2..130 as @e[tag=c9_b] at @s unless block ^ ^ ^4 chiseled_deepslate unless block ^ ^ ^3 chiseled_deepslate unless block ^ ^ ^2 chiseled_deepslate unless block ^ ^ ^1 chiseled_deepslate run tp @s ^ ^ ^4
  10. /execute if score #tick c9_t matches 2..130 as @e[tag=c9_b] at @s run particle soul_fire_flame ~ ~2.2 ~ 0.3 0.5 0.3 0.03 10
  11. /execute if score #tick c9_t matches 2..130 as @e[tag=c9_b] at @s if block ~ ~-1 ~ polished_deepslate run setblock ~ ~-1 ~ magma_block
  12. /execute if score #tick c9_t matches 2..130 as @e[tag=c9_b] at @s if block ~ ~ ~ air run setblock ~ ~2 ~ soul_lantern
  13. /execute if score #tick c9_t matches 25 run fill ~-12 ~ ~ ~12 ~2 ~ air
  14. /execute as @e[tag=c9_core] at @s run tp @s ~ ~ ~ ~8 ~

How it works

Frames from the test run

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

Recorded on our own test server: 60 frames at about 9.8 fps. Our image check saw: A large deepslate structure is being carved out with corridors, soul lanterns, a central rotating beacon, and glowing builder entities.

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. Stand at the center of an open flat area with at least 16 blocks of space in every direction.
  2. Run the 10 setup commands in chat one by one to build the deepslate foundation, central loot room, and first builder orb.
  3. Place 14 repeating command blocks in a line or column outside the 31x31 maze border and set all of them to Always Active.
  4. Paste each loop command into its own repeating command block in order from 1 to 14.
  5. Watch from a high angle as the four glowing orbs dart across the stone block, blasting away corridors and lighting the dungeon.

Use it with real players

To trigger the dungeon builder around yourself in survival or adventure mode, run the setup and loop commands prefixed with /execute at @p run ... or trigger them when holding a custom item using /execute as @a[nbt={SelectedItem:{id:"minecraft:recovery_compass"}}] at @s run ... so the maze generates around your position.

Remove it again 4 commands

  1. /kill @e[tag=c9_m]
  2. /fill ~-15 ~-1 ~-15 ~15 ~-1 ~15 grass_block
  3. /fill ~-15 ~ ~-15 ~15 ~4 ~15 air
  4. /scoreboard objectives remove c9_t

FAQ

Why does the maze have an open top instead of a solid ceiling?

Leaving the top open lets you watch the glowing orbs carve out the corridors and place lanterns inside; if you want a dark roof afterward, run /fill ~-14 ~3 ~-14 ~14 ~3 ~14 deepslate_tiles once the orbs finish.

Can I reset and generate a fresh maze layout?

Yes! Refill the deepslate brick layer with /fill ~-14 ~ ~-14 ~14 ~2 ~14 deepslate_bricks, clear the center room, and set #tick on scoreboard c9_t back to 0.

Commands used

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

Similar creations

Join 9Minecraft News & Guides