Self-Assembling Dungeon Complex

Watch four glowing builder cubes march across a 4-block grid, automatically assembling an open-top stone brick dungeon with chiseled pillars and soul lanterns.

Java EditionComplex Contraptions & CinematicsExpert24 commandsTested on a real 26.2 & 26.3 server
Glowing cyan cubes finish building an open-top stone brick dungeon grid in Minecraft. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresMedievalMysticDarkCyanBlueBuilding ToolAdventure MapMap MakingBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Rotation math21+ commands

Four glowing cyan builder cubes rise from a central chiseled shrine and glide outward across an empty field along a 4-block grid. Every 14 ticks they step forward, turn corners in formation, and construct an open-top stone brick dungeon fortress in real time.

Because the chambers leave the top open, you can clearly watch each room form with chiseled corner pillars, stone brick floors, wide arched doorways connecting the halls, and glowing soul lanterns lighting the walls at night.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-16 ~ ~-16 ~16 ~8 ~16 air
  3. /fill ~-16 ~-1 ~-16 ~16 ~-1 ~16 grass_block
  4. /fill ~-2 ~-1 ~-2 ~2 ~3 ~2 chiseled_stone_bricks
  5. /fill ~-1 ~ ~-1 ~1 ~3 ~1 air
  6. /setblock ~ ~ ~ soul_lantern
  7. /summon block_display ~ ~ ~ {Tags:["c9_gen","c9_b"],Rotation:[180f,0f],Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},teleport_duration:6,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,0.9f,0.9f],translation:[-0.45f,4.0f,-0.45f]}}
  8. /summon block_display ~ ~ ~ {Tags:["c9_gen","c9_b"],Rotation:[0f,0f],Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},teleport_duration:6,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,0.9f,0.9f],translation:[-0.45f,4.0f,-0.45f]}}
  9. /summon block_display ~ ~ ~ {Tags:["c9_gen","c9_b"],Rotation:[-90f,0f],Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},teleport_duration:6,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,0.9f,0.9f],translation:[-0.45f,4.0f,-0.45f]}}
  10. /summon block_display ~ ~ ~ {Tags:["c9_gen","c9_b"],Rotation:[90f,0f],Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},teleport_duration:6,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,0.9f,0.9f],translation:[-0.45f,4.0f,-0.45f]}}

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

  1. /scoreboard players add #c9_core c9_t 1
  2. /execute at @e[tag=c9_b] run particle dust{color:[0.15,0.95,1.0],scale:1.8} ~ ~3.5 ~ 1.0 1.2 1.0 0 10
  3. /execute if score #c9_core c9_t matches 14 as @e[tag=c9_b] run scoreboard players add @s c9_t 1
  4. /execute if score #c9_core c9_t matches 14 as @e[tag=c9_b] at @s run tp @s ^ ^ ^4
  5. /execute if score #c9_core c9_t matches 14 at @e[tag=c9_b] if block ~-2 ~4 ~-2 air run fill ~-2 ~-1 ~-2 ~2 ~3 ~2 chiseled_stone_bricks
  6. /execute if score #c9_core c9_t matches 14 at @e[tag=c9_b] if block ~-2 ~4 ~-2 air run fill ~-1 ~-1 ~-2 ~1 ~2 ~2 stone_bricks
  7. /execute if score #c9_core c9_t matches 14 at @e[tag=c9_b] if block ~-2 ~4 ~-2 air run fill ~-2 ~-1 ~-1 ~2 ~2 ~1 stone_bricks
  8. /execute if score #c9_core c9_t matches 14 at @e[tag=c9_b] if block ~-2 ~4 ~-2 air run fill ~-1 ~ ~-1 ~1 ~3 ~1 air
  9. /execute if score #c9_core c9_t matches 14 at @e[tag=c9_b] if block ~-2 ~4 ~-2 air run setblock ~-2 ~4 ~-2 soul_lantern
  10. /execute if score #c9_core c9_t matches 14 at @e[tag=c9_b] positioned ^ ^ ^-2 run fill ~-1 ~ ~-1 ~1 ~2 ~1 air
  11. /execute if score #c9_core c9_t matches 14 as @e[tag=c9_b,scores={c9_t=3}] at @s run tp @s ~ ~ ~ ~90 ~
  12. /execute if score #c9_core c9_t matches 14 as @e[tag=c9_b,scores={c9_t=6}] at @s run tp @s ~ ~ ~ ~90 ~
  13. /execute if score #c9_core c9_t matches 14 run kill @e[tag=c9_b,scores={c9_t=9..}]
  14. /execute if score #c9_core c9_t matches 14 run scoreboard players set #c9_core c9_t 0

How it works

Frames from the test run

Self-Assembling Dungeon Complex - frame 1Self-Assembling Dungeon Complex - frame 2Self-Assembling Dungeon Complex - frame 3

Recorded on our own test server: 50 frames at about 8.3 fps. Our image check saw: Glowing cyan sea-lantern cubes with blue particles finish constructing a large, open-top grid of chiseled stone brick dungeon corridors and rooms, then disappear.

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 grassy area at least 35x35 blocks wide and stand at the exact centre on top of the grass.
  2. Run all 10 setup commands in chat in order to prepare the scoreboard, central shrine, and four builder entities.
  3. Place 14 command blocks in a chain or line nearby, set the first one to Repeating, Always Active, and the rest to Chain, Always Active.
  4. Paste each of the 14 loop commands into its command block in the listed order.
  5. Set the time to night if you want the glowing soul lanterns and cyan dust trails to stand out clearly while the complex builds itself.

Use it with real players

To trigger a single builder path from where you are standing instead of the four-way demo, give yourself a marker command or run /summon block_display ~ ~ ~ {Tags:["c9_gen","c9_b"],Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},teleport_duration:6,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,0.9f,0.9f],translation:[-0.45f,4.0f,-0.45f]}} with your current yaw, and keep the 14 loop command blocks active in a loaded chunk.

Remove it again 4 commands

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

FAQ

Why did the builders stop after 9 steps?

Step 9 completes the outer square ring and links each wing back into the neighboring corridor, then kills the c9_b entities so they do not keep marching outside the cleared area.

How can I change the speed of the dungeon assembly?

Change the number 14 in loop commands 3 through 14 to a larger number such as 20 for slower steps, or 10 for faster steps.

Commands used

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

Similar creations

Join 9Minecraft News & Guides