Automated Factory Assembly Line

Build a self-running factory assembly line in vanilla Minecraft where glowing presses stamp raw cobblestone into iron and diamond blocks on a conveyor belt.

Java EditionComplex Contraptions & CinematicsHard25 commandsTested on a real 26.2 & 26.3 server
Glowing blocks travel along a dark conveyor belt through automated copper and gold stamping presses. Download the GIF Video & GIF © www.9minecraft.net

Factories & MachinesIndustrialTechnologyFireOrangeGoldCyanDecorationMap MakingBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Sounds21+ commands

This command creation builds a self-running factory assembly line right before your eyes. Raw cobblestone blocks dispense onto a dark conveyor belt and slide through two overhead stamping arches equipped with glowing robotic presses.

As each block passes under the first press, the copper arm slams down with a burst of lava sparks and compresses the cobblestone into an iron block. Seconds later, the second golden press strikes the iron block with magical sparks, upgrading it into a finished diamond block before it drops into the collection hopper.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /fill ~-8 ~ ~-2 ~8 ~ ~2 polished_andesite
  3. /fill ~-7 ~ ~-1 ~7 ~ ~1 smooth_stone_slab[type=double]
  4. /fill ~-6 ~1 ~ ~6 ~1 ~ polished_blackstone_slab[type=bottom]
  5. /fill ~-2 ~1 ~-2 ~-2 ~4 ~2 iron_bars
  6. /fill ~2 ~1 ~-2 ~2 ~4 ~2 iron_bars
  7. /setblock ~-6 ~1 ~ dispenser[facing=east]
  8. /setblock ~6 ~ ~ hopper
  9. /summon block_display ~-2 ~3.2 ~ {Tags:["c9_mach","c9_arm1"],Glowing:1b,block_state:{Name:"minecraft:copper_block"},interpolation_duration:4,transformation:{translation:[-0.45f,-0.8f,-0.45f],scale:[0.9f,1.4f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  10. /summon block_display ~2 ~3.2 ~ {Tags:["c9_mach","c9_arm2"],Glowing:1b,block_state:{Name:"minecraft:gold_block"},interpolation_duration:4,transformation:{translation:[-0.45f,-0.8f,-0.45f],scale:[0.9f,1.4f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}

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

  1. /scoreboard players add #c9_main c9_tick 1
  2. /execute if score #c9_main c9_tick matches 41.. run scoreboard players set #c9_main c9_tick 1
  3. /execute if score #c9_main c9_tick matches 1 run summon block_display ~-5.5 ~1.5 ~ {Tags:["c9_mach","c9_item"],Glowing:1b,teleport_duration:1,block_state:{Name:"minecraft:cobblestone"},transformation:{translation:[-0.35f,0f,-0.35f],scale:[0.7f,0.7f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  4. /execute if score #c9_main c9_tick matches 1 run playsound minecraft:block.dispenser.dispense block @a ~-6 ~1 ~ 0.8 1.2
  5. /execute as @e[tag=c9_item] at @s run tp @s ~0.1 ~ ~
  6. /execute as @e[tag=c9_item] run scoreboard players add @s c9_tick 1
  7. /particle minecraft:crit ~ ~1.5 ~ 4.5 0.05 0.1 0.02 4
  8. /execute as @e[tag=c9_item,scores={c9_tick=35}] at @s run data merge entity @s {block_state:{Name:"minecraft:iron_block"}}
  9. /execute if score #c9_main c9_tick matches 35 run particle minecraft:lava ~-2 ~1.8 ~ 0.3 0.3 0.3 0.1 25
  10. /execute if score #c9_main c9_tick matches 35 run playsound minecraft:block.anvil.place block @a ~-2 ~1.8 ~ 0.6 1.4
  11. /execute as @e[tag=c9_item,scores={c9_tick=75}] at @s run data merge entity @s {block_state:{Name:"minecraft:diamond_block"}}
  12. /execute if score #c9_main c9_tick matches 35 run particle minecraft:wax_on ~2 ~1.8 ~ 0.4 0.4 0.4 0.5 30
  13. /execute if score #c9_main c9_tick matches 31..38 as @e[tag=c9_mach,tag=!c9_item] run data merge entity @s {start_interpolation:0,transformation:{translation:[-0.45f,-1.65f,-0.45f],scale:[0.9f,1.7f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  14. /execute if score #c9_main c9_tick matches 1..30 as @e[tag=c9_mach,tag=!c9_item] run data merge entity @s {start_interpolation:0,transformation:{translation:[-0.45f,-0.8f,-0.45f],scale:[0.9f,1.4f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  15. /kill @e[tag=c9_item,scores={c9_tick=112..}]

How it works

Frames from the test run

Automated Factory Assembly Line - frame 1Automated Factory Assembly Line - frame 2Automated Factory Assembly Line - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A conveyor belt on a stone platform moves glowing cobblestone, iron, and diamond blocks under iron-bar arches with glowing copper and gold presses emitting lava sparks and smoke.

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 on a flat open area where you want the centre of your factory conveyor belt to be built.
  2. Run the 10 setup commands one by one in chat (or place them in a chain of impulse command blocks) to build the factory base, arches, and robotic press arms.
  3. Place 15 repeating command blocks (or 1 repeating command block connected to 14 chain command blocks) nearby and set them all to Always Active.
  4. Paste each loop command into the repeating/chain command blocks in order.
  5. Watch the dispenser release cobblestone onto the belt as the two hydraulic presses rhythmically stamp them into iron and diamond blocks.

Use it with real players

To make this factory dispense real items you can pick up, add a conditional command block right before the final /kill command that runs /execute at @e[tag=c9_item,scores={c9_tick=111}] run summon item ~ ~ ~ {Item:{id:"minecraft:diamond",count:1}} so finished blocks drop into the hopper at the end of the line.

Remove it again 3 commands

  1. /kill @e[tag=c9_mach]
  2. /scoreboard objectives remove c9_tick
  3. /fill ~-8 ~ ~-2 ~8 ~5 ~2 air

FAQ

Why do the blocks move so smoothly along the conveyor belt?

Each moving block is a block_display entity with teleport_duration set to 1 tick, which tells the Minecraft client to smoothly slide the block between each 0.1-block teleport.

Can I change what blocks the factory produces?

Yes! Change minecraft:cobblestone, minecraft:iron_block, and minecraft:diamond_block in loop commands 3, 8, and 11 to any block IDs you want on your assembly line.

Commands used

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

Similar creations

Join 9Minecraft News & Guides