Smart Obstacle-Course Runner

Watch an autonomous armor stand use live block sensors, velocity physics, and coordinate math to leap over walls, gaps, and platforms toward a moving beacon.

Java EditionComplex Contraptions & CinematicsExpert24 commandsTested on a real 26.2 & 26.3 server
A glowing armor stand navigates a custom obstacle course with fences, water, and platforms. Download the GIF Video & GIF © www.9minecraft.net

SimulationsTechnologyWhiteCyanLearningMini-gameBlock displaysArmor standsBlock building (fill/setblock/clone)Rotation math21+ commands

Traditional Minecraft mob pathfinding often struggles with parkour gaps and sudden wall climbs. This command creation replaces standard AI with a custom physics and sensor engine running entirely in command blocks. A glowing armor stand runner scans the terrain immediately ahead of it and uses direct velocity adjustments to leap over hazards, clear water trenches, and climb multi-tiered platforms.

In the demonstration arena, a floating goal beacon relocates every few seconds to one of four different stations—including a high tower, a walled trench, and a water hazard. The runner dynamically calculates the horizontal distance to the target, turns to face it, and uses local coordinate sensors (^ ^ ^) to trigger jumps at the exact tick required to clear obstacles.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_val dummy
  2. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 polished_deepslate
  3. /fill ~-3 ~ ~-1 ~3 ~ ~-1 red_sandstone_wall
  4. /fill ~-1 ~ ~-3 ~-1 ~ ~3 red_sandstone_wall
  5. /fill ~-7 ~ ~-7 ~-4 ~1 ~-4 prismarine_bricks
  6. /fill ~-6 ~2 ~-6 ~-5 ~2 ~-5 sea_lantern
  7. /fill ~4 ~-1 ~4 ~7 ~-1 ~7 water
  8. /fill ~5 ~ ~5 ~6 ~ ~6 gold_block
  9. /summon block_display ~-5.5 ~3.5 ~-5.5 {Tags:["c9_ent","c9_goal"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:beacon"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,0.8f,0.8f],translation:[-0.4f,-0.4f,-0.4f]}}
  10. /summon armor_stand ~ ~ ~ {Tags:["c9_ent","c9_runner"],Glowing:1b,ShowArms:1b,NoBasePlate:1b,equipment:{head:{id:"minecraft:golden_helmet"},chest:{id:"minecraft:diamond_chestplate"},legs:{id:"minecraft:diamond_leggings"},feet:{id:"minecraft:golden_boots"}}}

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

  1. /scoreboard players add #tick c9_val 1
  2. /execute if score #tick c9_val matches 90.. run scoreboard players set #tick c9_val 0
  3. /execute if score #tick c9_val matches 0 run scoreboard players add #stage c9_val 1
  4. /execute if score #stage c9_val matches 4.. run scoreboard players set #stage c9_val 0
  5. /execute if score #tick c9_val matches 0 if score #stage c9_val matches 0 run tp @e[tag=c9_goal] ~-5.5 ~3.5 ~-5.5
  6. /execute if score #tick c9_val matches 0 if score #stage c9_val matches 1 run tp @e[tag=c9_goal] ~5.5 ~1.5 ~5.5
  7. /execute if score #tick c9_val matches 0 if score #stage c9_val matches 2 run tp @e[tag=c9_goal] ~6.0 ~1.0 ~-6.0
  8. /execute if score #tick c9_val matches 0 if score #stage c9_val matches 3 run tp @e[tag=c9_goal] ~-6.0 ~1.0 ~6.0
  9. /execute as @e[tag=c9_goal] at @s run particle end_rod ~ ~ ~ 0.3 0.5 0.3 0.02 2 force
  10. /execute as @e[tag=c9_runner] at @s facing entity @e[tag=c9_goal,limit=1] feet run tp @s ~ ~ ~ ~ 0
  11. /execute as @e[tag=c9_runner] at @s unless entity @e[tag=c9_goal,distance=..1.5] rotated ~ 0 run tp @s ^ ^ ^0.24
  12. /execute as @e[tag=c9_runner] at @s rotated ~ 0 unless block ^ ^ ^0.75 air if block ~ ~-0.1 ~ #minecraft:mineable/pickaxe run data modify entity @s Motion[1] set value 0.52d
  13. /execute as @e[tag=c9_runner] at @s rotated ~ 0 if block ^ ^-1 ^0.8 water unless block ~ ~-0.5 ~ water run data modify entity @s Motion[1] set value 0.52d
  14. /execute as @e[tag=c9_runner] at @s run particle dust{color:[0.1,0.9,1.0],scale:1.0} ~ ~0.2 ~ 0.1 0.1 0.1 0 3 force

How it works

Frames from the test run

Smart Obstacle-Course Runner - frame 1Smart Obstacle-Course Runner - frame 2Smart Obstacle-Course Runner - frame 3

Recorded on our own test server: 68 frames at about 9.7 fps. Our image check saw: A glowing armor stand navigates an obstacle course with fences, water, and raised platforms to capture a flag.

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 in the center of a flat open area and run the 10 setup commands in chat to build the obstacle course, scoreboard, goal beacon, and runner.
  2. Place a line of 14 Repeating Command Blocks set to 'Always Active' near the arena.
  3. Paste each of the 14 loop commands into the repeating command blocks in order.
  4. Ensure the repeating command blocks are executed relative to the center of the arena (or wrap them with /execute positioned X Y Z run ... matching where you stood during setup).
  5. Watch the runner automatically orient itself toward the moving beacon and jump over the walls, water trench, and prismarine tower.

Use it with real players

To let a real player control the target destination instead of using the automated timer, remove loop commands 1 through 8 and run /execute at @p run tp @e[tag=c9_goal] ^ ^1 ^5 in a repeating command block. The runner will dynamically navigate the obstacles toward wherever you point your crosshair.

Remove it again 4 commands

  1. /kill @e[tag=c9_ent]
  2. /scoreboard objectives remove c9_val
  3. /fill ~-9 ~ ~-9 ~9 ~4 ~9 air
  4. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 grass_block

FAQ

Why does the runner use Motion[1] for jumping instead of teleporting upward?

Modifying Motion[1] gives the armor stand real upward velocity, allowing Minecraft's native gravity to create a smooth parabolic jump arc while forward teleportation carries it across obstacles.

How does the runner avoid double-jumping in mid-air?

The wall sensor command checks 'if block ~ ~-0.1 ~ #minecraft:mineable/pickaxe', ensuring the runner only triggers a vertical velocity boost when its feet are touching the arena floor or platforms.

Commands used

/data/execute/fill/particle/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides