Shape-Shifting Trash Compactor Robot

Build a shape-shifting salvage robot in Vanilla Minecraft using block displays and interpolation to unfold from a metal cube, crush scrap, and fold back.

Java EditionComplex Contraptions & CinematicsHard21 commandsTested on a real 26.2 & 26.3 server
A yellow trash compactor robot unfolds its treads and binocular head on a stone platform. Download the GIF Video & GIF © www.9minecraft.net

TransformationsTechnologyIndustrialYellowBlackWhiteDecorationCinematicAdventure MapBlock displaysArmor standsSmooth animation (interpolation)Riding & passengersSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

Inspired by classic sci-fi salvage automatons, this command creation brings a shape-shifting trash compactor robot to life on your stage. The robot starts tucked inside its weathered yellow chassis as a compact metal cube before unfolding its heavy caterpillar treads, extendable binocular head, and hydraulic arms.

Once deployed, the automaton swivels around, pulls scrap metal into its chest cavity to crush it into a dense block with bursts of steam and sparks, and neatly folds back into a cube.

1. Setup - type these once 7 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /fill ~-3 ~-1 ~-3 ~3 ~-1 ~3 minecraft:iron_block
  3. /fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 minecraft:smooth_stone
  4. /setblock ~-2 ~ ~-2 minecraft:mossy_cobblestone
  5. /setblock ~2 ~ ~2 minecraft:oxidized_cut_copper
  6. /summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_ent","c9_core"],Invisible:1b,NoGravity:1b,Small:1b,Passengers:[{id:"minecraft:block_display",Tags:["c9_ent","c9_body"],block_state:{Name:"minecraft:yellow_terracotta"},Glowing:1b,glow_color_override:16766720,interpolation_duration:10,teleport_duration:2,transformation:{translation:[-0.7f,0.0f,-0.7f],left_rotation:[0f,0f,0f,1f],scale:[1.4f,1.4f,1.4f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_ent","c9_tread"],block_state:{Name:"minecraft:coal_block"},interpolation_duration:10,teleport_duration:2,transformation:{translation:[-0.6f,0.05f,-0.6f],left_rotation:[0f,0f,0f,1f],scale:[1.2f,0.4f,1.2f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_ent","c9_head"],block_state:{Name:"minecraft:observer",Properties:{facing:"north"}},Glowing:1b,glow_color_override:65535,interpolation_duration:10,teleport_duration:2,transformation:{translation:[-0.35f,0.4f,-0.35f],left_rotation:[0f,0f,0f,1f],scale:[0.7f,0.5f,0.7f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_ent","c9_arms"],block_state:{Name:"minecraft:anvil"},interpolation_duration:10,teleport_duration:2,transformation:{translation:[-0.5f,0.4f,-0.4f],left_rotation:[0f,0f,0f,1f],scale:[1.0f,0.4f,0.6f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_ent","c9_trash"],block_state:{Name:"minecraft:mossy_cobblestone"},Glowing:1b,glow_color_override:5635925,interpolation_duration:10,teleport_duration:2,transformation:{translation:[-0.4f,0.4f,-1.5f],left_rotation:[0f,0f,0f,1f],scale:[0.8f,0.8f,0.8f],right_rotation:[0f,0f,0f,1f]}}]}
  7. /scoreboard players set @e[tag=c9_core] c9_tick 0

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=130..}] run scoreboard players set @s c9_tick 1
  3. /execute as @e[tag=c9_core,scores={c9_tick=10}] at @s run data merge entity @e[tag=c9_body,limit=1] {start_interpolation:0,transformation:{translation:[-0.7f,0.4f,-0.7f],left_rotation:[0f,0f,0f,1f],scale:[1.4f,1.3f,1.4f],right_rotation:[0f,0f,0f,1f]}}
  4. /execute as @e[tag=c9_core,scores={c9_tick=10}] at @s run data merge entity @e[tag=c9_tread,limit=1] {start_interpolation:0,transformation:{translation:[-1.0f,0.0f,-0.8f],left_rotation:[0f,0f,0f,1f],scale:[2.0f,0.55f,1.6f],right_rotation:[0f,0f,0f,1f]}}
  5. /execute as @e[tag=c9_core,scores={c9_tick=20}] at @s run data merge entity @e[tag=c9_head,limit=1] {start_interpolation:0,transformation:{translation:[-0.5f,1.75f,-0.5f],left_rotation:[0f,0f,0f,1f],scale:[1.0f,0.7f,1.0f],right_rotation:[0f,0f,0f,1f]}}
  6. /execute as @e[tag=c9_core,scores={c9_tick=20}] at @s run data merge entity @e[tag=c9_arms,limit=1] {start_interpolation:0,transformation:{translation:[-0.9f,0.75f,-1.4f],left_rotation:[0f,0f,0f,1f],scale:[1.8f,0.45f,1.2f],right_rotation:[0f,0f,0f,1f]}}
  7. /execute as @e[tag=c9_core,scores={c9_tick=30..70}] at @s run tp @s ~ ~ ~ ~4.5 ~
  8. /execute as @e[tag=c9_core,scores={c9_tick=75}] at @s run data merge entity @e[tag=c9_trash,limit=1] {start_interpolation:0,transformation:{translation:[-0.25f,0.7f,-0.5f],left_rotation:[0f,0f,0f,1f],scale:[0.5f,0.5f,0.5f],right_rotation:[0f,0f,0f,1f]}}
  9. /execute as @e[tag=c9_core,scores={c9_tick=90}] at @s run data merge entity @e[tag=c9_trash,limit=1] {start_interpolation:0,transformation:{translation:[-0.35f,0.5f,-1.4f],left_rotation:[0f,0f,0f,1f],scale:[0.7f,0.7f,0.7f],right_rotation:[0f,0f,0f,1f]}}
  10. /execute as @e[tag=c9_core,scores={c9_tick=105}] at @s run data merge entity @e[tag=c9_body,limit=1] {start_interpolation:0,transformation:{translation:[-0.7f,0.0f,-0.7f],left_rotation:[0f,0f,0f,1f],scale:[1.4f,1.4f,1.4f],right_rotation:[0f,0f,0f,1f]}}
  11. /execute as @e[tag=c9_core,scores={c9_tick=105}] at @s run data merge entity @e[tag=c9_tread,limit=1] {start_interpolation:0,transformation:{translation:[-0.6f,0.05f,-0.6f],left_rotation:[0f,0f,0f,1f],scale:[1.2f,0.4f,1.2f],right_rotation:[0f,0f,0f,1f]}}
  12. /execute as @e[tag=c9_core,scores={c9_tick=105}] at @s run data merge entity @e[tag=c9_head,limit=1] {start_interpolation:0,transformation:{translation:[-0.35f,0.4f,-0.35f],left_rotation:[0f,0f,0f,1f],scale:[0.7f,0.5f,0.7f],right_rotation:[0f,0f,0f,1f]}}
  13. /execute as @e[tag=c9_core,scores={c9_tick=105}] at @s run data merge entity @e[tag=c9_arms,limit=1] {start_interpolation:0,transformation:{translation:[-0.5f,0.4f,-0.4f],left_rotation:[0f,0f,0f,1f],scale:[1.0f,0.4f,0.6f],right_rotation:[0f,0f,0f,1f]}}
  14. /execute as @e[tag=c9_core,scores={c9_tick=20..100}] at @s run particle minecraft:poof ~ ~0.9 ~ 0.4 0.4 0.4 0.02 2

How it works

Frames from the test run

Shape-Shifting Trash Compactor Robot - frame 1Shape-Shifting Trash Compactor Robot - frame 2Shape-Shifting Trash Compactor Robot - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A yellow block-based robot on a stone platform unfolds black treads, an observer head, and mossy cobblestone arms while emitting white particles.

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 clearing and stand at the center where you want the salvage robot pad to appear.
  2. Run the 6 setup commands in chat or inside impulse command blocks to build the metallic platform and summon the robot.
  3. Place 14 repeating command blocks (or 1 repeating command block chained into 13 chain command blocks) nearby and set them all to Always Active.
  4. Paste each of the 14 loop commands into the command blocks in order.
  5. Watch the robot automatically unfold from its cube form, swivel, compact its scrap block, and fold back up.

Use it with real players

To let a player control when the robot unfolds instead of looping automatically, remove loop commands 0 and 1, and trigger /scoreboard players add @e[tag=c9_core] c9_tick 1 only while a player holds a specific controller item using /execute if entity @a[nbt={SelectedItem:{id:"minecraft:lever"}}] run scoreboard players add @e[tag=c9_core] c9_tick 1.

Remove it again 4 commands

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

FAQ

Why do the robot parts move smoothly instead of snapping instantly?

Each block_display entity is summoned with interpolation_duration:10. Whenever a loop command merges a new transformation with start_interpolation:0, Minecraft smoothly animates the scale and position over 10 ticks (0.5 seconds).

How do the parts stay attached when the robot turns?

All five block_display parts ride the central c9_core armor stand as passengers, and their local transformations rotate automatically whenever the host armor stand rotates.

Commands used

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

Similar creations

Join 9Minecraft News & Guides