Watch a glowing Copper Golem dynamically calculate paths around shifting deepslate walls to reach a relocating target beacon in a cybernetic arena.
Custom MobsTechnologyBlackOrangeCyanLearningMini-gameMap MakingBlock displaysSummoned mobsBlock building (fill/setblock/clone)Rotation math13-20 commands
This command creation builds a self-contained pathfinding arena where an autonomous Copper Golem navigates through shifting maze obstacles to reach a glowing beacon. Every few seconds, the target beacon teleports to a new quadrant while deepslate walls rise and fall across the floor.
Using real-time directional ray-checking and laser telemetry particles, the NPC scans for blocked paths, makes right-angle turns around barriers, and leaves a neon breadcrumb trail until it captures the goal.
/scoreboard objectives add c9_t dummy/fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 minecraft:polished_deepslate/fill ~-9 ~ ~-9 ~9 ~1 ~9 minecraft:tinted_glass hollow/fill ~-8 ~ ~-8 ~8 ~1 ~8 minecraft:air/summon minecraft:block_display ~6 ~ ~6 {Tags:["c9_e","c9_goal"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:beacon"},transformation:{translation:[-0.4f,0.0f,-0.4f],scale:[0.8f,0.8f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/summon minecraft:copper_golem ~-6 ~ ~-6 {Tags:["c9_e","c9_bot"],NoAI:1b,Glowing:1b,CustomName:{"text":"Pathfinder","color":"aqua"}}/scoreboard players add #tick c9_t 1/execute if score #tick c9_t matches 1..20 run fill ~-3 ~ ~-5 ~-3 ~1 ~2 minecraft:cracked_deepslate_tiles replace minecraft:air/execute if score #tick c9_t matches 1..20 run fill ~3 ~ ~-2 ~3 ~1 ~5 minecraft:cracked_deepslate_tiles replace minecraft:air/execute if score #tick c9_t matches 80 run fill ~-3 ~ ~-5 ~3 ~1 ~5 minecraft:air replace minecraft:cracked_deepslate_tiles/execute if score #tick c9_t matches 80..100 run fill ~-5 ~ ~2 ~2 ~1 ~2 minecraft:cracked_deepslate_tiles replace minecraft:air/execute if score #tick c9_t matches 80..100 run fill ~-2 ~ ~-3 ~5 ~1 ~-3 minecraft:cracked_deepslate_tiles replace minecraft:air/execute if score #tick c9_t matches 160.. run fill ~-5 ~ ~-3 ~5 ~1 ~2 minecraft:air replace minecraft:cracked_deepslate_tiles/execute if score #tick c9_t matches 160.. run scoreboard players set #tick c9_t 0/execute as @e[tag=c9_bot] at @s facing entity @e[tag=c9_goal,limit=1] feet positioned ^ ^ ^0.95 unless block ~ ~ ~ minecraft:air run tp @s ~ ~ ~ ~85 ~/execute as @e[tag=c9_bot] at @s facing entity @e[tag=c9_goal,limit=1] feet positioned ^ ^ ^0.95 if block ~ ~ ~ minecraft:air run tp @s ~ ~ ~ ~ ~/execute as @e[tag=c9_bot] at @s positioned ^ ^ ^0.35 if block ~ ~ ~ minecraft:air run tp @s ^ ^ ^0.22/execute as @e[tag=c9_bot] at @s unless block ^ ^ ^0.6 minecraft:air run tp @s ~ ~ ~ ~65 ~/execute at @e[tag=c9_bot] run particle minecraft:dust{color:[0.1,1.0,0.8],scale:1.0} ~ ~0.2 ~ 0.05 0.05 0.05 0 2/execute at @e[tag=c9_goal] run particle minecraft:end_rod ~ ~0.8 ~ 0.2 0.8 0.2 0.02 2setup #6 Summons the autonomous Copper Golem with <code>NoAI:1b</code> so our custom pathfinding engine controls its exact rotation and velocity.loop #3 Raises the first pair of vertical deepslate maze barriers across the arena floor during the first half of the cycle.loop #9 Checks 0.95 blocks ahead along the direct line-of-sight to the goal beacon. If a wall is detected, the NPC turns 85 degrees to skirt around the obstacle instead of walking into it.loop #10 When the line-of-sight directly toward the beacon is clear of walls, the NPC snaps its rotation to face the goal.loop #11 Moves the NPC forward 0.22 blocks per tick along its current heading as long as the block directly ahead is open air.


Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A deepslate arena contains shifting deepslate walls and a small glowing NPC standing right next to a glowing beacon in the bottom right corner.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To have the autonomous NPC pathfind toward a real player instead of the beacon, replace @e[tag=c9_goal,limit=1] in the loop commands with @p. The Copper Golem will dynamically navigate around walls to follow you across the maze.
/kill @e[tag=c9_e]/scoreboard objectives remove c9_t/fill ~-9 ~ ~-9 ~9 ~2 ~9 minecraft:air/fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 minecraft:grass_blockIt uses two forward block checks: a 0.95-block ray toward the beacon to steer parallel to walls early, and a 0.6-block collision bumper that rotates it 65 degrees if a corner blocks its path.
Yes! You can disable the wall-shifting commands (loop commands 2 through 7) and build any wall layout inside the glass border using solid blocks.
▶Thread-Spinning Loom Weaver BossCustom MobsExpert23 cmds
▶Da Vinci Ornithopter Griffin AutomatonCustom MobsExpert24 cmds
▶Neon Cyberpunk Hologram KitsuneCustom MobsHard24 cmds
▶Prismatic Stained-Glass Peacock UnfurlingCustom MobsHard24 cmds
▶Steampunk Espresso Machine GolemCustom MobsHard23 cmds
▶Sub-Atomic Electron Cloud ElementalCustom MobsHard24 cmds