Autonomous Labyrinth Weaver

Watch four glowing golden energy orbs race through a solid deepslate monolith, carving an intricate, shifting dungeon maze around a glowing cyan core.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
Glowing golden pillars with blue particles carve out a lit dungeon from a solid deepslate structure. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresMysticDarkTechnologyGoldCyanBlackMap MakingAdventure MapMini-gameItem displaysSummoned mobsBlock building (fill/setblock/clone)21+ commands

The Autonomous Labyrinth Weaver turns a solid block of deepslate into a complex dungeon right before your eyes. Starting from a glowing cyan conduit core at the center, four floating golden energy pillars wake up and begin racing through the stonework, leaving trails of soul fire, particles, and glowing lanterns in their wake.

Using randomized directional steps and block checks, the weavers carve out hallways, chambers, and intersections without ever breaking through the outer boundary wall. Because every step is chosen at random, the labyrinth layout is completely unique every single time you run it.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /scoreboard objectives add c9_step dummy
  3. /scoreboard objectives add c9_dir dummy
  4. /fill ~-13 ~-1 ~-13 ~13 ~-1 ~13 minecraft:polished_deepslate
  5. /fill ~-13 ~ ~-13 ~13 ~3 ~13 minecraft:deepslate_bricks
  6. /fill ~-12 ~ ~-12 ~12 ~3 ~12 minecraft:deepslate_tiles
  7. /fill ~-1 ~ ~-1 ~1 ~3 ~1 minecraft:air
  8. /setblock ~ ~ ~ minecraft:sea_lantern
  9. /summon minecraft:item_display ~ ~2.5 ~ {Tags:["c9_ent","c9_core"],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.2f,2.2f,2.2f],translation:[0f,0f,0f]}}
  10. /summon minecraft:marker ~ ~ ~ {Tags:["c9_ent","c9_ctrl"]}

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

  1. /execute as @e[tag=c9_ctrl] run scoreboard players add @s c9_tick 1
  2. /execute as @e[tag=c9_ctrl,scores={c9_tick=1}] at @s run summon minecraft:item_display ~3 ~1.5 ~ {Tags:["c9_ent","c9_weaver"],Glowing:1b,glow_color_override:16766720,item:{id:"minecraft:gold_block",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.1f,2.8f,1.1f],translation:[0f,0f,0f]}}
  3. /execute as @e[tag=c9_ctrl,scores={c9_tick=1}] at @s run summon minecraft:item_display ~-3 ~1.5 ~ {Tags:["c9_ent","c9_weaver"],Glowing:1b,glow_color_override:16755200,item:{id:"minecraft:gold_block",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.1f,2.8f,1.1f],translation:[0f,0f,0f]}}
  4. /execute as @e[tag=c9_ctrl,scores={c9_tick=1}] at @s run summon minecraft:item_display ~ ~1.5 ~3 {Tags:["c9_ent","c9_weaver"],Glowing:1b,glow_color_override:16766720,item:{id:"minecraft:gold_block",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.1f,2.8f,1.1f],translation:[0f,0f,0f]}}
  5. /execute as @e[tag=c9_ctrl,scores={c9_tick=1}] at @s run summon minecraft:item_display ~ ~1.5 ~-3 {Tags:["c9_ent","c9_weaver"],Glowing:1b,glow_color_override:16755200,item:{id:"minecraft:gold_block",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.1f,2.8f,1.1f],translation:[0f,0f,0f]}}
  6. /execute as @e[tag=c9_weaver] run scoreboard players add @s c9_step 1
  7. /execute as @e[tag=c9_weaver,scores={c9_step=2..}] store result score @s c9_dir run random value 0..3
  8. /execute as @e[tag=c9_weaver,scores={c9_step=2..,c9_dir=0}] at @s unless block ~3 ~ ~ minecraft:deepslate_bricks unless block ~3 ~ ~ minecraft:air run tp @s ~3 ~ ~
  9. /execute as @e[tag=c9_weaver,scores={c9_step=2..,c9_dir=1}] at @s unless block ~-3 ~ ~ minecraft:deepslate_bricks unless block ~-3 ~ ~ minecraft:air run tp @s ~-3 ~ ~
  10. /execute as @e[tag=c9_weaver,scores={c9_step=2..,c9_dir=2}] at @s unless block ~ ~ ~3 minecraft:deepslate_bricks unless block ~ ~ ~3 minecraft:air run tp @s ~ ~ ~3
  11. /execute as @e[tag=c9_weaver,scores={c9_step=2..,c9_dir=3}] at @s unless block ~ ~ ~-3 minecraft:deepslate_bricks unless block ~ ~ ~-3 minecraft:air run tp @s ~ ~ ~-3
  12. /execute as @e[tag=c9_weaver,scores={c9_step=2..}] at @s run fill ~-1 ~-1 ~-1 ~1 ~2 ~1 minecraft:air replace minecraft:deepslate_tiles
  13. /execute as @e[tag=c9_weaver,scores={c9_step=2..}] at @s run setblock ~ ~-2 ~ minecraft:sea_lantern
  14. /execute as @e[tag=c9_weaver,scores={c9_step=2..}] at @s run particle minecraft:soul_fire_flame ~ ~1 ~ 0.6 1.2 0.6 0.08 20 force

How it works

Frames from the test run

Autonomous Labyrinth Weaver - frame 1Autonomous Labyrinth Weaver - frame 2Autonomous Labyrinth Weaver - frame 3

Recorded on our own test server: 56 frames at about 9.3 fps. Our image check saw: A large block of deepslate bricks is partially carved out into rooms with sea lanterns in the floor, while two glowing golden pillars surrounded by cyan particles float near a central conduit.

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 a flat open area where you want the 27x27 labyrinth to appear.
  2. Run each of the 10 setup commands in order to build the deepslate monolith, the central glowing conduit core, and the scoreboard objectives.
  3. Place a line of 14 repeating command blocks (all set to Always Active) near the arena.
  4. Paste each of the 14 loop commands into the repeating command blocks.
  5. Watch from above as the four golden weavers spawn around the core and carve out the glowing dungeon corridors.

Use it with real players

To let players trigger a dungeon carve around themselves, replace the c9_ctrl marker summon in setup with a command that tags a player (/tag @p add c9_ctrl) when they drop a special item, and run the setup /fill commands executed at @a[tag=c9_ctrl].

Remove it again 6 commands

  1. /kill @e[tag=c9_ent]
  2. /fill ~-13 ~-1 ~-13 ~13 ~4 ~13 minecraft:air
  3. /fill ~-13 ~-1 ~-13 ~13 ~-1 ~13 minecraft:grass_block
  4. /scoreboard objectives remove c9_tick
  5. /scoreboard objectives remove c9_step
  6. /scoreboard objectives remove c9_dir

FAQ

Why do the weavers never break through the outside wall of the maze?

The outer ring is built from deepslate bricks while the inside is filled with deepslate tiles. The weavers check that the block 3 spaces ahead is not deepslate bricks before moving, and their fill command only replaces deepslate tiles.

Can I reset and generate a new maze layout without rebuilding the command blocks?

Yes! Just kill the entities with /kill @e[tag=c9_ent] and re-run the last 7 setup commands to refill the monolith and spawn a fresh controller.

Commands used

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

Similar creations

Join 9Minecraft News & Guides