Live Maze Solver Trails

Glowing cyan nodes sweep across an obstacle grid in real time, then guide a glowing beacon along the shortest golden particle route to the goal.

Java EditionMini-games & UtilitiesHard24 commandsTested on a real 26.2 & 26.3 server
Cyan search nodes fill a dark Minecraft maze before a golden beacon traces the shortest path. Download the GIF Video & GIF © www.9minecraft.net

Arenas & Mini-gamesTechnologyCyanGoldBlackLearningMini-gameMap MakingBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)21+ commands

A live breadth-first search sweeps glowing cyan crystal nodes and particles outward across a dark slate obstacle grid, exploring every corridor and dead end in real time.

The instant the wave reaches the emerald start pad, a glowing golden beacon materializes and glides smoothly back along the shortest c9_dist gradient, lighting up the optimal route with golden particle trails.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /scoreboard objectives add c9_dist dummy
  3. /fill ~-6 ~-1 ~-6 ~6 ~1 ~6 minecraft:polished_deepslate hollow
  4. /fill ~-6 ~1 ~-6 ~6 ~1 ~6 minecraft:air
  5. /fill ~-3 ~ ~-5 ~-3 ~ ~2 minecraft:quartz_bricks
  6. /fill ~-1 ~ ~1 ~2 ~ ~1 minecraft:quartz_bricks
  7. /fill ~0 ~ ~-3 ~0 ~ ~3 minecraft:quartz_bricks
  8. /fill ~3 ~ ~-2 ~3 ~ ~5 minecraft:quartz_bricks
  9. /summon minecraft:block_display ~-4 ~ ~-4 {Tags:["c9_start"],block_state:{Name:"minecraft:emerald_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.4f,-0.02f,-0.4f],scale:[0.8f,0.12f,0.8f]},brightness:{sky:15,block:15},Glowing:1b,glow_color_override:5635925}
  10. /summon minecraft:block_display ~4 ~ ~4 {Tags:["c9_goal"],block_state:{Name:"minecraft:amethyst_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.4f,-0.02f,-0.4f],scale:[0.8f,0.12f,0.8f]},brightness:{sky:15,block:15},Glowing:1b,glow_color_override:16733695}

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

  1. /execute unless entity @e[tag=c9_node] at @e[tag=c9_goal] run summon minecraft:block_display ~ ~ ~ {Tags:["c9_node","c9_temp"],block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,0.02f,-0.22f],scale:[0.44f,0.16f,0.44f]},brightness:{sky:15,block:15}}
  2. /execute unless entity @e[tag=c9_runner] run scoreboard players add #wave c9_t 1
  3. /execute unless entity @e[tag=c9_runner] as @e[tag=c9_node] unless score @s c9_dist matches 1.. run scoreboard players operation @s c9_dist = #wave c9_t
  4. /execute unless entity @e[tag=c9_runner] at @e[tag=c9_start] if entity @e[tag=c9_node,distance=..0.5] run summon minecraft:block_display ~ ~ ~ {Tags:["c9_runner","c9_temp"],block_state:{Name:"minecraft:beacon"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.35f,0.18f,-0.35f],scale:[0.7f,0.7f,0.7f]},teleport_duration:1,brightness:{sky:15,block:15},Glowing:1b,glow_color_override:16766720}
  5. /execute unless entity @e[tag=c9_runner] as @e[tag=c9_node] if score @s c9_dist = #wave c9_t at @s positioned ~ ~ ~-1 if block ~ ~ ~ minecraft:air unless entity @e[tag=c9_node,distance=..0.5] run summon minecraft:block_display ~ ~ ~ {Tags:["c9_node","c9_temp"],block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,0.02f,-0.22f],scale:[0.44f,0.16f,0.44f]},brightness:{sky:15,block:15}}
  6. /execute unless entity @e[tag=c9_runner] as @e[tag=c9_node] if score @s c9_dist = #wave c9_t at @s positioned ~ ~ ~1 if block ~ ~ ~ minecraft:air unless entity @e[tag=c9_node,distance=..0.5] run summon minecraft:block_display ~ ~ ~ {Tags:["c9_node","c9_temp"],block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,0.02f,-0.22f],scale:[0.44f,0.16f,0.44f]},brightness:{sky:15,block:15}}
  7. /execute unless entity @e[tag=c9_runner] as @e[tag=c9_node] if score @s c9_dist = #wave c9_t at @s positioned ~1 ~ ~ if block ~ ~ ~ minecraft:air unless entity @e[tag=c9_node,distance=..0.5] run summon minecraft:block_display ~ ~ ~ {Tags:["c9_node","c9_temp"],block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,0.02f,-0.22f],scale:[0.44f,0.16f,0.44f]},brightness:{sky:15,block:15}}
  8. /execute unless entity @e[tag=c9_runner] as @e[tag=c9_node] if score @s c9_dist = #wave c9_t at @s positioned ~-1 ~ ~ if block ~ ~ ~ minecraft:air unless entity @e[tag=c9_node,distance=..0.5] run summon minecraft:block_display ~ ~ ~ {Tags:["c9_node","c9_temp"],block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,0.02f,-0.22f],scale:[0.44f,0.16f,0.44f]},brightness:{sky:15,block:15}}
  9. /execute if entity @e[tag=c9_runner] at @e[tag=c9_runner] run tag @e[tag=c9_node,distance=..0.4,limit=1] add c9_opt
  10. /execute if entity @e[tag=c9_runner] run scoreboard players remove #wave c9_t 1
  11. /execute if entity @e[tag=c9_runner] if score #wave c9_t matches 1.. at @e[tag=c9_runner] as @e[tag=c9_node,distance=0.8..1.2] if score @s c9_dist = #wave c9_t at @s run tp @e[tag=c9_runner,limit=1] ~ ~ ~
  12. /execute if entity @e[tag=c9_runner] if score #wave c9_t matches ..0 run kill @e[tag=c9_temp]
  13. /execute unless entity @e[tag=c9_runner] as @e[tag=c9_node] if score @s c9_dist = #wave c9_t at @s run particle minecraft:dust{color:[0.1,0.95,1.0],scale:1.5} ~ ~0.45 ~ 0.1 0.1 0.1 0 3 force
  14. /execute if entity @e[tag=c9_runner] at @e[tag=c9_opt] run particle minecraft:dust{color:[1.0,0.8,0.1],scale:1.5} ~ ~0.4 ~ 0.08 0.08 0.08 0 2 force

How it works

Frames from the test run

Live Maze Solver Trails - frame 1Live Maze Solver Trails - frame 2Live Maze Solver Trails - frame 3

Recorded on our own test server: 50 frames at about 9.8 fps. Our image check saw: An overhead view of a dark slate grid maze in Minecraft shows cyan crystal nodes spreading across corridors from a magenta pad toward an emerald pad, followed by a glowing golden beacon moving along the shortest path with golden particle trails.

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. Clear a flat 15x15 area of grass in your world and stand at the center block.
  2. Run all 10 setup commands in chat (or from impulse command blocks) at the center block to create the scoreboards, deepslate arena, quartz maze walls, and start/goal pads.
  3. Place 14 Repeating, Unconditional, Always Active command blocks nearby and paste the 14 loop commands into them in order.
  4. Ensure the command blocks are loaded and watch the cyan wave sweep from the amethyst goal to the emerald start pad.
  5. Once the wave reaches the start pad, watch the golden beacon glide along the shortest route; you can also break or place quartz bricks in the maze at any time to see the next cycle reroute live.

Use it with real players

To guide a real player instead of the demo start pad, remove the c9_start block display and replace @e[tag=c9_start] in loop command 4 with @p (and teleport or guide @p using the c9_opt particle trail, or let the beacon spawn at @p as a live pathfinding guide).

Remove it again 7 commands

  1. /kill @e[tag=c9_temp]
  2. /kill @e[tag=c9_start]
  3. /kill @e[tag=c9_goal]
  4. /scoreboard objectives remove c9_t
  5. /scoreboard objectives remove c9_dist
  6. /fill ~-6 ~ ~-6 ~6 ~ ~6 minecraft:air
  7. /fill ~-6 ~-1 ~-6 ~6 ~-1 ~6 minecraft:grass_block

FAQ

Can I change the maze walls while the creation is running?

Yes. Add or remove any blocks at the maze level (one block above the deepslate floor) and the next solver wave will automatically route around the new layout.

Why does the cyan wave start at the amethyst goal instead of the emerald start pad?

Running the breadth-first flood from the goal outward assigns every open tile its exact remaining distance to the goal, letting the self-guiding beacon follow descending numbers straight to the target without a separate backtracking delay.

Commands used

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

Similar creations

Join 9Minecraft News & Guides