Automated Ore Refinery

Build an automated ore refinery with a moving conveyor belt, a mechanical crusher, and a laser smelter that turns raw stone into diamond blocks.

Java EditionMini-games & UtilitiesMedium24 commandsTested on a real 26.2 & 26.3 server
An automated Minecraft assembly line refines cobblestone and raw ore into glowing diamond blocks on a conveyor. Download the GIF Video & GIF © www.9minecraft.net

Spawners & GeneratorsIndustrialTechnologyGoldCyanBlackDecorationMini-gameLearningBlock displaysBlock building (fill/setblock/clone)21+ commands

The Automated Ore Refinery is a factory assembly line powered by block displays and scoreboard timers. Raw cobblestone enters on the left side of the conveyor belt and travels through two processing stations: a heavy iron crusher that reveals raw ore inside the rock, and a high-energy beacon laser that smelts the ore into pure diamond blocks before sorting them into a collection bin.

Using scaled block_display entities and custom dust particle beams, the machine runs continuously with smooth movement, mechanical piston animations, and glowing status effects.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /fill ~-9 ~ ~-2 ~9 ~ ~2 polished_andesite
  3. /fill ~-8 ~ ~ ~8 ~ ~2 black_concrete
  4. /fill ~-8 ~1 ~ ~8 ~1 ~ smooth_stone_slab[type=bottom]
  5. /fill ~-8 ~1 ~-1 ~8 ~1 ~-1 iron_trapdoor[half=top,facing=south,open=false]
  6. /fill ~-4 ~1 ~-1 ~-2 ~4 ~1 iron_block
  7. /fill ~-4 ~1 ~ ~-2 ~2 ~ air
  8. /fill ~2 ~1 ~-1 ~4 ~4 ~1 netherite_block
  9. /fill ~2 ~1 ~ ~4 ~2 ~ air
  10. /summon marker ~ ~1 ~ {Tags:["c9_ctrl"]}

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

  1. /scoreboard players add @e[tag=c9_ctrl] c9_timer 1
  2. /execute if score @e[tag=c9_ctrl,limit=1] c9_timer matches 40.. run scoreboard players set @e[tag=c9_ctrl] c9_timer 0
  3. /execute if score @e[tag=c9_ctrl,limit=1] c9_timer matches 1 run summon block_display ~-8 ~1.5 ~ {Tags:["c9_ore","c9_raw"],Glowing:1b,glow_color_override:11184810,block_state:{Name:"minecraft:cobblestone"},transformation:{translation:[-0.3f,0.0f,-0.3f],scale:[0.6f,0.6f,0.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  4. /execute as @e[tag=c9_ore] at @s run tp @s ~0.08 ~ ~
  5. /scoreboard players add @e[tag=c9_ore] c9_timer 1
  6. /execute as @e[tag=c9_ore,tag=c9_raw, scores={c9_timer=62}] at @s run data merge entity @s {Tags:["c9_ore","c9_crushed"],glow_color_override:16755200,block_state:{Name:"minecraft:raw_gold_block"}}
  7. /execute as @e[tag=c9_ore,scores={c9_timer=62}] at @s run particle block{block_state:{Name:"minecraft:cobblestone"}} ~ ~0.3 ~ 0.3 0.2 0.3 0.1 35 force
  8. /execute if entity @e[tag=c9_ore,scores={c9_timer=58..66}] run fill ~-3 ~2 ~ ~-3 ~2 ~ piston[facing=down]
  9. /execute unless entity @e[tag=c9_ore,scores={c9_timer=58..66}] run fill ~-3 ~2 ~ ~-3 ~2 ~ air
  10. /execute as @e[tag=c9_ore,scores={c9_timer=125..150}] at @s run particle dust{color:[0.0,1.0,1.0],scale:1.5} ~ ~1.2 ~ 0.05 0.6 0.05 0 6 force
  11. /execute as @e[tag=c9_ore,scores={c9_timer=125..150}] at @s run particle lava ~ ~0.3 ~ 0.1 0.1 0.1 0 1 force
  12. /execute as @e[tag=c9_ore,tag=c9_crushed,scores={c9_timer=145}] at @s run data merge entity @s {Tags:["c9_ore","c9_refined"],glow_color_override:5636095,block_state:{Name:"minecraft:diamond_block"}}
  13. /execute as @e[tag=c9_ore,scores={c9_timer=145}] at @s run particle totem_of_undying ~ ~0.4 ~ 0.3 0.3 0.3 0.2 25 force
  14. /execute as @e[tag=c9_ore,scores={c9_timer=200..}] at @s run kill @s

How it works

Frames from the test run

Automated Ore Refinery - frame 1Automated Ore Refinery - frame 2Automated Ore Refinery - frame 3

Recorded on our own test server: 57 frames at about 9.5 fps. Our image check saw: Glowing block displays of cobblestone, raw gold, and diamond move along a conveyor belt through an iron block structure and a netherite block structure.

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. Clear a flat space at least 20x10 blocks wide and stand at the center of the area.
  2. Run each command from the Setup list in chat to build the factory base, conveyor belt, and scoreboard objective.
  3. Place 14 Repeating Command Blocks in a chain or cluster nearby, all set to Always Active.
  4. Paste one Loop command into each repeating command block, keeping them aligned with the center coordinates of your build.
  5. Watch the conveyor automatically spawn cobblestone, crush it into raw ore, and laser-refine it into diamond blocks.

Use it with real players

To make this machine refine real items dropped by players, replace the timer-based summon in loop command 3 with an execute check that detects dropped cobblestone items at the start of the belt (/execute at @e[type=item,nbt={Item:{id:"minecraft:cobblestone"}}] run ...) and kills the dropped item when spawning the display entity. Then, right before loop command 14 kills the display entity at the end of the line, summon a real diamond item into a hopper or chest.

Remove it again 4 commands

  1. /kill @e[tag=c9_ore]
  2. /kill @e[tag=c9_ctrl]
  3. /scoreboard objectives remove c9_timer
  4. /fill ~-9 ~ ~-2 ~9 ~5 ~2 air

FAQ

How do I change what block comes out at the end of the refinery?

In loop command 12, change minecraft:diamond_block inside the block_state tag to any other block ID, such as minecraft:emerald_block or minecraft:netherite_block.

Will the summoned blocks cause lag if left running?

No. Loop command 14 automatically removes every block display entity after 200 ticks (10 seconds), so there are never more than 5 ore entities on the belt at the same time.

Commands used

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

Similar creations

Join 9Minecraft News & Guides