Build an automated ore refinery with a moving conveyor belt, a mechanical crusher, and a laser smelter that turns raw stone into diamond blocks.
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.
/scoreboard objectives add c9_timer dummy/fill ~-9 ~ ~-2 ~9 ~ ~2 polished_andesite/fill ~-8 ~ ~ ~8 ~ ~2 black_concrete/fill ~-8 ~1 ~ ~8 ~1 ~ smooth_stone_slab[type=bottom]/fill ~-8 ~1 ~-1 ~8 ~1 ~-1 iron_trapdoor[half=top,facing=south,open=false]/fill ~-4 ~1 ~-1 ~-2 ~4 ~1 iron_block/fill ~-4 ~1 ~ ~-2 ~2 ~ air/fill ~2 ~1 ~-1 ~4 ~4 ~1 netherite_block/fill ~2 ~1 ~ ~4 ~2 ~ air/summon marker ~ ~1 ~ {Tags:["c9_ctrl"]}/scoreboard players add @e[tag=c9_ctrl] c9_timer 1/execute if score @e[tag=c9_ctrl,limit=1] c9_timer matches 40.. run scoreboard players set @e[tag=c9_ctrl] c9_timer 0/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]}}/execute as @e[tag=c9_ore] at @s run tp @s ~0.08 ~ ~/scoreboard players add @e[tag=c9_ore] c9_timer 1/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"}}/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/execute if entity @e[tag=c9_ore,scores={c9_timer=58..66}] run fill ~-3 ~2 ~ ~-3 ~2 ~ piston[facing=down]/execute unless entity @e[tag=c9_ore,scores={c9_timer=58..66}] run fill ~-3 ~2 ~ ~-3 ~2 ~ air/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/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/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"}}/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/execute as @e[tag=c9_ore,scores={c9_timer=200..}] at @s run kill @sloop #3 Every 40 ticks (2 seconds), a scaled <code>block_display</code> entity looking like cobblestone is summoned at the start of the conveyor belt with a grey glowing outline.loop #4 Teleports every ore block 0.08 blocks forward along the X-axis each tick, creating smooth conveyor belt motion.loop #6 When an ore block reaches 62 ticks of travel (right inside the iron crusher), <code>/data merge</code> changes its block state to a raw gold block and updates its glow color to orange.loop #8 Places a downward-facing piston block right above the stone for a few ticks as it passes through the first housing to simulate a mechanical crusher.loop #10 While an ore block is inside the second netherite chamber (ticks 125 to 150), a cyan dust laser beam fires down from the ceiling onto the moving block.loop #12 At tick 145, the laser finishes refining the material and converts the display entity into a glowing diamond block.


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.
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.
/kill @e[tag=c9_ore]/kill @e[tag=c9_ctrl]/scoreboard objectives remove c9_timer/fill ~-9 ~ ~-2 ~9 ~5 ~2 airIn 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.
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.
▶Tesla Coil Lightning Arc SpawnerSpawners & GeneratorsMedium24 cmds
▶3D Conveyor Belt LoopSpawners & GeneratorsMedium26 cmds
▶Automated Conveyor AssemblySpawners & GeneratorsEasy24 cmds
▶Automated Conveyor FactorySpawners & GeneratorsEasy24 cmds
▶Automated Crop HarvesterSpawners & GeneratorsMedium24 cmds
▶Automated Factory Assembly LineSpawners & GeneratorsMedium24 cmds