Arcade Ghost AI Maze in Vanilla Minecraft

Build a glowing neon arcade maze where four colorful block-display ghosts autonomously hunt down a runner using Minecraft's native mob pathfinding AI.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
Colorful arcade characters navigate a glowing neon maze built with sea lanterns and blue glass in Minecraft. Download the GIF Video & GIF © www.9minecraft.net

SimulationsTechnologyCuteBlueYellowPinkMini-gameServer LobbyLearningBlock displaysItem displaysRiding & passengersSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

This command creation builds a glowing neon arcade maze directly in your world, complete with a golden runner and four colorful arcade ghosts: Blinky, Pinky, Inky, and Clyde. Instead of relying on stiff scripted tracks, the ghosts use Minecraft's built-in mob pathfinding engine to navigate around the glowing sea lantern barriers and corner their target in real time.

Each ghost is rendered using scaled block display entities with glowing outlines, floating eyes, and color-matched neon dust trails. Meanwhile, the runner weaves around the perimeter, leaving a trail of golden pellets and glowing light effects while trying to stay ahead of the pack.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /fill ~-12 ~-1 ~-12 ~12 ~-1 ~12 black_concrete
  3. /fill ~-12 ~ ~-12 ~12 ~1 ~12 sea_lantern outline
  4. /fill ~-11 ~ ~-11 ~11 ~1 ~11 air
  5. /fill ~-8 ~ ~-8 ~-3 ~ ~-3 blue_stained_glass
  6. /fill ~3 ~ ~-8 ~8 ~ ~-3 blue_stained_glass
  7. /fill ~-8 ~ ~3 ~-3 ~ ~8 blue_stained_glass
  8. /fill ~3 ~ ~3 ~8 ~ ~8 blue_stained_glass
  9. /summon villager ~ ~ ~-10 {Tags:["c9_ent","c9_actor"],NoAI:1b,Silent:1b,Invulnerable:1b,active_effects:[{id:"minecraft:invisibility",duration:999999,show_particles:0b}],Passengers:[{id:"minecraft:block_display",Tags:["c9_ent"],Glowing:1b,glow_color_override:16766720,block_state:{Name:"minecraft:gold_block"},transformation:{translation:[-0.5f,-0.5f,-0.5f],scale:[1.0f,1.0f,1.0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}
  10. /summon zombie ~-10 ~ ~-10 {Tags:["c9_ent","c9_ghost","c9_g_red"],Silent:1b,Invulnerable:1b,IsBaby:0b,active_effects:[{id:"minecraft:invisibility",duration:999999,show_particles:0b},{id:"minecraft:fire_resistance",duration:999999,show_particles:0b}],Passengers:[{id:"minecraft:block_display",Tags:["c9_ent"],Glowing:1b,glow_color_override:16724787,block_state:{Name:"minecraft:red_concrete"},transformation:{translation:[-0.6f,-1.5f,-0.6f],scale:[1.2f,1.4f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Tags:["c9_ent"],item:{id:"minecraft:ender_eye",count:1},transformation:{translation:[0.0f,-0.6f,0.65f],scale:[0.8f,0.8f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}

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

  1. /scoreboard players add #tick c9_timer 1
  2. /execute if score #tick c9_timer matches 2 run summon zombie ~10 ~ ~-10 {Tags:["c9_ent","c9_ghost","c9_g_pink"],Silent:1b,Invulnerable:1b,IsBaby:0b,active_effects:[{id:"minecraft:invisibility",duration:999999,show_particles:0b},{id:"minecraft:fire_resistance",duration:999999,show_particles:0b}],Passengers:[{id:"minecraft:block_display",Tags:["c9_ent"],Glowing:1b,glow_color_override:16742330,block_state:{Name:"minecraft:pink_concrete"},transformation:{translation:[-0.6f,-1.5f,-0.6f],scale:[1.2f,1.4f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Tags:["c9_ent"],item:{id:"minecraft:ender_eye",count:1},transformation:{translation:[0.0f,-0.6f,0.65f],scale:[0.8f,0.8f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}
  3. /execute if score #tick c9_timer matches 3 run summon zombie ~-10 ~ ~10 {Tags:["c9_ent","c9_ghost","c9_g_cyan"],Silent:1b,Invulnerable:1b,IsBaby:0b,active_effects:[{id:"minecraft:invisibility",duration:999999,show_particles:0b},{id:"minecraft:fire_resistance",duration:999999,show_particles:0b}],Passengers:[{id:"minecraft:block_display",Tags:["c9_ent"],Glowing:1b,glow_color_override:3394815,block_state:{Name:"minecraft:cyan_concrete"},transformation:{translation:[-0.6f,-1.5f,-0.6f],scale:[1.2f,1.4f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Tags:["c9_ent"],item:{id:"minecraft:ender_eye",count:1},transformation:{translation:[0.0f,-0.6f,0.65f],scale:[0.8f,0.8f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}
  4. /execute if score #tick c9_timer matches 4 run summon zombie ~10 ~ ~10 {Tags:["c9_ent","c9_ghost","c9_g_orange"],Silent:1b,Invulnerable:1b,IsBaby:0b,active_effects:[{id:"minecraft:invisibility",duration:999999,show_particles:0b},{id:"minecraft:fire_resistance",duration:999999,show_particles:0b}],Passengers:[{id:"minecraft:block_display",Tags:["c9_ent"],Glowing:1b,glow_color_override:16750848,block_state:{Name:"minecraft:orange_concrete"},transformation:{translation:[-0.6f,-1.5f,-0.6f],scale:[1.2f,1.4f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Tags:["c9_ent"],item:{id:"minecraft:ender_eye",count:1},transformation:{translation:[0.0f,-0.6f,0.65f],scale:[0.8f,0.8f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}
  5. /execute if score #tick c9_timer matches 5 run fill ~-2 ~ ~-2 ~2 ~ ~2 sea_lantern
  6. /execute as @e[tag=c9_actor] at @s run tp @s ^ ^ ^0.45 facing entity @e[tag=c9_ghost,sort=nearest,limit=1] feet
  7. /execute as @e[tag=c9_actor] at @s run tp @s ~ ~ ~ ~105 0
  8. /execute as @e[tag=c9_actor] at @s if block ~ ~ ~-0.6 sea_lantern run tp @s ~ ~0.05 ~0.5
  9. /execute as @e[tag=c9_actor] at @s if block ~ ~ ~0.6 sea_lantern run tp @s ~ ~0.05 ~-0.5
  10. /execute as @e[tag=c9_actor] at @s if block ~-0.6 ~ ~ sea_lantern run tp @s ~0.5 ~0.05 ~
  11. /execute as @e[tag=c9_actor] at @s if block ~0.6 ~ ~ sea_lantern run tp @s ~-0.5 ~0.05 ~
  12. /execute at @e[tag=c9_g_red] run particle dust{color:[1.0,0.1,0.1],scale:1.8} ~ ~0.5 ~ 0.2 0.2 0.2 0 3
  13. /execute at @e[tag=c9_g_pink] run particle dust{color:[1.0,0.4,0.8],scale:1.8} ~ ~0.5 ~ 0.2 0.2 0.2 0 3
  14. /execute at @e[tag=c9_actor] run particle end_rod ~ ~0.5 ~ 0.1 0.1 0.1 0.02 2

How it works

Frames from the test run

Arcade Ghost AI Maze in Vanilla Minecraft - frame 1Arcade Ghost AI Maze in Vanilla Minecraft - frame 2Arcade Ghost AI Maze in Vanilla Minecraft - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A black and blue arcade maze bordered by sea lanterns contains red, pink, and yellow glowing cube characters, with the yellow one jumping out of the arena.

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. Create a flat space in your world at least 30x30 blocks wide and stand in the exact center.
  2. Run each of the 10 Setup commands in chat (or paste them into impulse command blocks triggered at the center) to build the neon maze floor, walls, runner, and red ghost.
  3. Place a chain of 14 command blocks starting with one Repeating Command Block (Always Active) followed by 13 Chain Command Blocks (Always Active, Unconditional).
  4. Paste the 14 Loop commands in order into the command block chain, making sure they execute relative to the center of the arena.
  5. Watch as the remaining three ghosts spawn into the corners and immediately begin navigating the maze corridors to corner the golden runner.

Use it with real players

To play inside the arcade maze yourself instead of watching the automated golden runner, remove the c9_actor villager with /kill @e[tag=c9_actor] and disable loop commands 6 through 11. Set your gamemode to Survival or Adventure so the zombie-powered arcade ghosts automatically lock onto you and pathfind around the glowing maze blocks to chase you down.

Remove it again 5 commands

  1. /tp @e[tag=c9_ent] ~ ~-500 ~
  2. /kill @e[tag=c9_ent]
  3. /fill ~-12 ~ ~-12 ~12 ~2 ~12 air
  4. /fill ~-12 ~-1 ~-12 ~12 ~-1 ~12 grass_block
  5. /scoreboard objectives remove c9_timer

FAQ

How do the arcade ghosts know how to walk around the maze walls without getting stuck?

Each ghost is powered by an invisible zombie chasing an invisible villager target. Minecraft's built-in A* mob pathfinding automatically calculates routes around the stained glass and sea lantern obstacles every tick.

Why do the block displays sit on the ground even though they are riding zombies?

Passengers normally sit on top of a mob's head, so the block displays use a transformation matrix with a negative Y translation of -1.5f to shift their visual models down to floor level while still rotating with the zombie.

Commands used

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

Similar creations

Join 9Minecraft News & Guides