Automated Walking Mech

Build a towering walking mech in vanilla Minecraft using block display entities that smoothly swings its legs, bobs its iron chassis, and sweeps a red scanner.

Java EditionComplex Contraptions & CinematicsExpert23 commandsTested on a real 26.2 & 26.3 server
A custom blocky robot mech walks across the grass emitting red scanner particles and blue flames. Download the GIF Video & GIF © www.9minecraft.net

Moving StructuresTechnologyIndustrialWhiteRedBlueCinematicBoss FightMap MakingBlock displaysArmor standsSmooth animation (interpolation)Rotation math21+ commands

Watch a towering robotic walker patrol your world completely on its own. Built from scaled block_display entities attached to an invisible controller, this mech smoothly swings its massive legs, bobs its heavy iron chassis, and sweeps the ground ahead with a glowing red scanner visor.

With every heavy footstep, dust clouds and dirt chunks fly up from the ground while blue exhaust flames vent from its rear engines and shoulder-mounted cannons lock onto targets.

1. Setup - type these once 9 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /summon armor_stand ~ ~ ~-3.5 {Tags:["c9_mech","c9_core"],Invisible:1b,NoGravity:1b,Rotation:[-90f,0f]}
  3. /summon block_display ~ ~ ~ {Tags:["c9_mech","c9_torso"],Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},teleport_duration:2,interpolation_duration:9,block_state:{Name:"minecraft:iron_block"},transformation:{translation:[-1.6f,2.6f,-1.1f],scale:[3.2f,3.0f,2.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  4. /summon block_display ~ ~ ~ {Tags:["c9_mech","c9_visor"],Glowing:1b,glow_color_override:16711680,brightness:{sky:15,block:15},teleport_duration:2,interpolation_duration:9,block_state:{Name:"minecraft:redstone_block"},transformation:{translation:[-1.2f,4.3f,0.2f],scale:[2.4f,0.7f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  5. /summon block_display ~ ~ ~ {Tags:["c9_mech","c9_core_glow"],Glowing:1b,glow_color_override:65535,brightness:{sky:15,block:15},teleport_duration:2,interpolation_duration:9,block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[-0.7f,3.1f,-1.3f],scale:[1.4f,1.4f,2.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  6. /summon block_display ~ ~ ~ {Tags:["c9_mech","c9_l_leg"],Glowing:1b,glow_color_override:16753920,brightness:{sky:15,block:15},teleport_duration:2,interpolation_duration:9,block_state:{Name:"minecraft:netherite_block"},transformation:{translation:[-2.5f,0.0f,-0.6f],scale:[1.0f,2.8f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  7. /summon block_display ~ ~ ~ {Tags:["c9_mech","c9_r_leg"],Glowing:1b,glow_color_override:16753920,brightness:{sky:15,block:15},teleport_duration:2,interpolation_duration:9,block_state:{Name:"minecraft:netherite_block"},transformation:{translation:[1.5f,0.0f,-0.6f],scale:[1.0f,2.8f,1.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  8. /summon block_display ~ ~ ~ {Tags:["c9_mech","c9_l_gun"],Glowing:1b,glow_color_override:11184810,brightness:{sky:15,block:15},teleport_duration:2,interpolation_duration:9,block_state:{Name:"minecraft:polished_deepslate"},transformation:{translation:[-2.7f,3.8f,-0.8f],scale:[1.1f,1.1f,3.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  9. /summon block_display ~ ~ ~ {Tags:["c9_mech","c9_r_gun"],Glowing:1b,glow_color_override:11184810,brightness:{sky:15,block:15},teleport_duration:2,interpolation_duration:9,block_state:{Name:"minecraft:polished_deepslate"},transformation:{translation:[1.6f,3.8f,-0.8f],scale:[1.1f,1.1f,3.2f],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 @e[tag=c9_core] c9_tick 1
  2. /execute as @e[tag=c9_core,scores={c9_tick=20..}] run scoreboard players set @s c9_tick 0
  3. /execute as @e[tag=c9_core] at @s run tp @s ^ ^ ^0.18 ~3.0 ~
  4. /execute as @e[tag=c9_core] at @s run tp @e[tag=c9_mech,tag=!c9_core] ~ ~ ~ ~ ~
  5. /execute as @e[tag=c9_core,scores={c9_tick=1}] run execute as @e[tag=c9_l_leg] run data merge entity @s {start_interpolation:0,transformation:{translation:[-2.5f,0.5f,0.9f],scale:[1.0f,2.8f,1.2f],left_rotation:[-0.28f,0f,0f,0.96f],right_rotation:[0f,0f,0f,1f]}}
  6. /execute as @e[tag=c9_core,scores={c9_tick=1}] run execute as @e[tag=c9_r_leg] run data merge entity @s {start_interpolation:0,transformation:{translation:[1.5f,0.0f,-1.1f],scale:[1.0f,2.8f,1.2f],left_rotation:[0.25f,0f,0f,0.968f],right_rotation:[0f,0f,0f,1f]}}
  7. /execute as @e[tag=c9_core,scores={c9_tick=11}] run execute as @e[tag=c9_l_leg] run data merge entity @s {start_interpolation:0,transformation:{translation:[-2.5f,0.0f,-1.1f],scale:[1.0f,2.8f,1.2f],left_rotation:[0.25f,0f,0f,0.968f],right_rotation:[0f,0f,0f,1f]}}
  8. /execute as @e[tag=c9_core,scores={c9_tick=11}] run execute as @e[tag=c9_r_leg] run data merge entity @s {start_interpolation:0,transformation:{translation:[1.5f,0.5f,0.9f],scale:[1.0f,2.8f,1.2f],left_rotation:[-0.28f,0f,0f,0.96f],right_rotation:[0f,0f,0f,1f]}}
  9. /execute as @e[tag=c9_core,scores={c9_tick=1}] run execute as @e[tag=c9_torso] run data merge entity @s {start_interpolation:0,transformation:{translation:[-1.6f,2.85f,-1.1f],scale:[3.2f,3.0f,2.2f],left_rotation:[0f,0f,0.04f,0.999f],right_rotation:[0f,0f,0f,1f]}}
  10. /execute as @e[tag=c9_core,scores={c9_tick=11}] run execute as @e[tag=c9_torso] run data merge entity @s {start_interpolation:0,transformation:{translation:[-1.6f,2.5f,-1.1f],scale:[3.2f,3.0f,2.2f],left_rotation:[0f,0f,-0.04f,0.999f],right_rotation:[0f,0f,0f,1f]}}
  11. /execute as @e[tag=c9_core,scores={c9_tick=9}] at @s run particle block{block_state:{Name:"minecraft:grass_block"}} ^2.0 ^0.1 ^0.5 0.5 0.2 0.5 0.15 45 force
  12. /execute as @e[tag=c9_core,scores={c9_tick=19}] at @s run particle block{block_state:{Name:"minecraft:grass_block"}} ^-2.0 ^0.1 ^0.5 0.5 0.2 0.5 0.15 45 force
  13. /execute as @e[tag=c9_core] at @s run particle dust{color:[1.0,0.05,0.05],scale:2.5} ^ ^4.6 ^2.6 1.2 0.1 0.8 0 10 force
  14. /execute as @e[tag=c9_core] at @s run particle soul_fire_flame ^ ^3.8 ^-1.6 0.4 0.3 0.3 0.04 5 force

How it works

Frames from the test run

Automated Walking Mech - frame 1Automated Walking Mech - frame 2Automated Walking Mech - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A blocky iron and netherite mech with glowing outlines walks across a grassy field while emitting red particles, blue flames, and dirt chunks.

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. Open a flat creative world and make sure command blocks are enabled.
  2. Run each of the 9 setup commands once in your chat window to create the scoreboard and assemble the mech parts.
  3. Place 14 repeating command blocks in a line or column, all set to Repeating, Unconditional, and Always Active.
  4. Paste one loop command into each repeating command block in order.
  5. Step back and watch the automated mech stomp around its patrol perimeter.

Use it with real players

To pilot the mech yourself instead of having it patrol in a circle, replace loop command 3 with /execute as @e[tag=c9_core] at @s facing entity @p eyes run tp @s ^ ^ ^0.18 ~ ~ so the mech turns and walks toward wherever you stand, or teleport @e[tag=c9_core] directly to a riding player's position and rotation.

Remove it again 2 commands

  1. /kill @e[tag=c9_mech]
  2. /scoreboard objectives remove c9_tick

FAQ

Why do the mech's legs move smoothly instead of snapping between positions?

Each block_display part has interpolation_duration set to 9 ticks and teleport_duration set to 2 ticks. Whenever start_interpolation:0 is merged into the entity every 10 ticks, Minecraft smoothly blends the position, scale, and rotation over the next half second.

How can I change the size or walking radius of the mech?

To make the patrol circle wider, decrease the ~3.0 rotation angle in the third loop command (for example, ~1.5 doubles the radius). To scale the mech itself, adjust the scale and translation arrays inside the setup and loop transformation NBT.

Commands used

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

Similar creations

Join 9Minecraft News & Guides