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.
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.
/scoreboard objectives add c9_t dummy/scoreboard objectives add c9_dist dummy/fill ~-6 ~-1 ~-6 ~6 ~1 ~6 minecraft:polished_deepslate hollow/fill ~-6 ~1 ~-6 ~6 ~1 ~6 minecraft:air/fill ~-3 ~ ~-5 ~-3 ~ ~2 minecraft:quartz_bricks/fill ~-1 ~ ~1 ~2 ~ ~1 minecraft:quartz_bricks/fill ~0 ~ ~-3 ~0 ~ ~3 minecraft:quartz_bricks/fill ~3 ~ ~-2 ~3 ~ ~5 minecraft:quartz_bricks/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}/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}/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}}/execute unless entity @e[tag=c9_runner] run scoreboard players add #wave c9_t 1/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/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}/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}}/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}}/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}}/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}}/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/execute if entity @e[tag=c9_runner] run scoreboard players remove #wave c9_t 1/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] ~ ~ ~/execute if entity @e[tag=c9_runner] if score #wave c9_t matches ..0 run kill @e[tag=c9_temp]/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/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 forcesetup #3 Builds the 13x13 polished deepslate arena floor and outer perimeter wall in one command, while commands 4-7 carve the inner quartz brick maze walls.loop #1 Starts each solver cycle by placing the first glowing cyan node at the amethyst goal pad so the reverse flood-fill can measure exact distance-to-goal values.loop #3 Tags every newly spawned frontier node with the current wave step in c9_dist, creating a complete shortest-path distance map across the maze.loop #5 Expands the wave one block in each cardinal direction (commands 4-7) only into air blocks that do not already hold a visited c9_node.loop #11 Once the wave hits the start pad and spawns c9_runner, it decrements #wave and glides the beacon smoothly to an orthogonal neighbor whose c9_dist equals #wave.loop #14 Renders bright golden dust particles along every c9_opt node the runner has passed through, leaving a visible optimal route trail.


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.
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).
/kill @e[tag=c9_temp]/kill @e[tag=c9_start]/kill @e[tag=c9_goal]/scoreboard objectives remove c9_t/scoreboard objectives remove c9_dist/fill ~-6 ~ ~-6 ~6 ~ ~6 minecraft:air/fill ~-6 ~-1 ~-6 ~6 ~-1 ~6 minecraft:grass_blockYes. 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.
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.
▶Gilded Zoetrope Spinning Animation DisplayArenas & Mini-gamesExpert23 cmds
▶Gyroscopic Floating Ring Obstacle ArenaArenas & Mini-gamesExpert23 cmds
▶Hydraulic Piston Crusher Survival PitArenas & Mini-gamesMedium25 cmds
▶Laser Grid Dodgeball Vault ArenaArenas & Mini-gamesMedium24 cmds
▶Magnetic Polarity Repulsion ArenaArenas & Mini-gamesMedium24 cmds
▶Origami Folding Paper Battle ArenaArenas & Mini-gamesExpert24 cmds