Automated Cake Factory

Build a working Minecraft Automated Cake Factory using block display entities and scoreboard timers to run a glowing assembly line with three stations.

Java EditionHolograms & Display EntitiesMedium24 commandsTested on a real 26.2 & 26.3 server
An automated Minecraft conveyor belt turns raw dough blocks into frosted cakes at three overhead machine stations. Download the GIF Video & GIF © www.9minecraft.net

Machines & MechanismsIndustrialTechnologyCuteCyanWhiteYellowDecorationMap MakingServer LobbyBlock displaysArmor standsSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Glowing outlines21+ commands

Watch an automated culinary assembly line bring fresh treats to life right before your eyes. This creation uses block display entities and scoreboard timers to run a dark-prismarine conveyor belt complete with three distinct machine stations: the Dough Press, the Icing Froster, and the Cherry Topper.

Raw sandstone dough slides smoothly down the belt, expanding with smooth interpolation as it receives a coat of white quartz icing and a bright red cherry finish before popping out as a real cake item into the collection chest at the end.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /scoreboard players set #factory c9_tick 0
  3. /fill ~-6 ~ ~-1 ~6 ~ ~1 polished_andesite
  4. /fill ~-6 ~ ~ ~5 ~ ~ dark_prismarine
  5. /setblock ~6 ~ ~ chest[facing=east]
  6. /fill ~-5 ~1 ~-1 ~5 ~1 ~-1 iron_bars
  7. /setblock ~-4 ~3 ~ dispenser[facing=down]
  8. /setblock ~ ~3 ~ dispenser[facing=down]
  9. /setblock ~4 ~3 ~ dispenser[facing=down]
  10. /summon armor_stand ~ ~1 ~ {Invisible:1b,NoGravity:1b,Marker:1b,Tags:["c9_cake","c9_init"]}

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

  1. /scoreboard players add #factory c9_tick 1
  2. /execute if score #factory c9_tick matches 50.. run scoreboard players set #factory c9_tick 0
  3. /execute if score #factory c9_tick matches 1 run summon block_display ~-5.5 ~1 ~ {Tags:["c9_cake","c9_dough"],Glowing:1b,glow_color_override:16766720,teleport_duration:2,interpolation_duration:5,block_state:{Name:"minecraft:smooth_sandstone_slab"},transformation:{translation:[-0.35f,0f,-0.35f],scale:[0.7f,0.6f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  4. /execute as @e[type=armor_stand,tag=c9_init] at @s run summon block_display ~-1.5 ~ ~ {Tags:["c9_cake","c9_iced"],Glowing:1b,glow_color_override:16777215,teleport_duration:2,interpolation_duration:5,block_state:{Name:"minecraft:quartz_slab"},transformation:{translation:[-0.35f,0f,-0.35f],scale:[0.7f,0.8f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  5. /execute as @e[type=armor_stand,tag=c9_init] at @s run summon block_display ~2.5 ~ ~ {Tags:["c9_cake","c9_done"],Glowing:1b,glow_color_override:16733525,teleport_duration:2,interpolation_duration:5,block_state:{Name:"minecraft:cake"},transformation:{translation:[-0.5f,0f,-0.5f],scale:[1f,1f,1f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  6. /kill @e[type=armor_stand,tag=c9_init]
  7. /execute as @e[type=block_display,tag=c9_cake] at @s run tp @s ~0.08 ~ ~
  8. /execute if score #factory c9_tick matches 18 run particle block{block_state:{Name:"minecraft:sand"}} ~-4 ~2.2 ~ 0.2 0.3 0.2 0.05 20
  9. /execute positioned ~ ~1 ~ as @e[type=block_display,tag=c9_dough,distance=..0.5] run data merge entity @s {Tags:["c9_cake","c9_iced"],glow_color_override:16777215,block_state:{Name:"minecraft:quartz_slab"},start_interpolation:0,transformation:{translation:[-0.35f,0f,-0.35f],scale:[0.7f,0.8f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  10. /execute if score #factory c9_tick matches 18 run particle splash ~ ~2.2 ~ 0.2 0.3 0.2 0.1 25
  11. /execute positioned ~4 ~1 ~ as @e[type=block_display,tag=c9_iced,distance=..0.5] run data merge entity @s {Tags:["c9_cake","c9_done"],glow_color_override:16733525,block_state:{Name:"minecraft:cake"},start_interpolation:0,transformation:{translation:[-0.5f,0f,-0.5f],scale:[1f,1f,1f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  12. /execute if score #factory c9_tick matches 18 run particle dust{color:[1.0,0.1,0.2],scale:1.5} ~4 ~2.0 ~ 0.2 0.3 0.2 0.05 20
  13. /execute positioned ~5.5 ~1 ~ as @e[type=block_display,tag=c9_done,distance=..0.5] at @s run summon item ~0.5 ~0.4 ~ {Tags:["c9_cake"],Age:5940s,Motion:[0.0,0.2,0.0],Item:{id:"minecraft:cake",count:1}}
  14. /execute positioned ~5.5 ~1 ~ as @e[type=block_display,tag=c9_cake,distance=..0.5] run kill @s

How it works

Frames from the test run

Automated Cake Factory - frame 1Automated Cake Factory - frame 2Automated Cake Factory - frame 3

Recorded on our own test server: 58 frames at about 9.4 fps. Our image check saw: A dark prismarine conveyor belt with three overhead stations moves glowing sandstone blocks that transform into white blocks and finally into finished cakes before dropping into a chest.

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 at the center of a flat open area where you want your factory line to run from west to east.
  2. Run the 10 setup commands in order to create the <code>c9_tick</code> scoreboard objective and build the conveyor belt, safety rail, collection chest, and three overhead dispenser stations.
  3. Place 14 repeating command blocks (or 1 repeating command block feeding into a line of 13 chain command blocks), all set to Always Active.
  4. Paste each of the 14 loop commands into the command blocks in order, keeping their relative coordinates centered on the middle of the conveyor belt.
  5. Watch the assembly line automatically press dough, frost it at the middle dispenser, top it with cherries at the third station, and pop out real cake items at the chest.

Use it with real players

This factory runs automatically as a standalone machine and already drops real collectable minecraft:cake items at the end of the belt. If you want to let players collect the cakes without them despawning quickly, change Age:5940s in loop command 13 to Age:0s, or place a hopper underneath the chest at ~6 ~ ~ to store the finished cakes automatically.

Remove it again 3 commands

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

FAQ

Why couldn't target selectors use relative coordinates like x=~3.8?

In Minecraft Java Edition, selector arguments like x, y, and z only accept exact numbers, not tilde relative coordinates. To check a relative spot, use execute positioned ~3.8 ~1 ~ first and then select entities with distance=..0.5.

How do I change the speed of the conveyor belt?

Change the ~0.08 distance in loop command 7 to a larger or smaller value, and adjust the 50.. tick reset in loop command 2 so the overhead particle bursts stay synchronized with the cakes passing underneath.

Commands used

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

Similar creations

Join 9Minecraft News & Guides