Build a working Minecraft Automated Cake Factory using block display entities and scoreboard timers to run a glowing assembly line with three stations.
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.
/scoreboard objectives add c9_tick dummy/scoreboard players set #factory c9_tick 0/fill ~-6 ~ ~-1 ~6 ~ ~1 polished_andesite/fill ~-6 ~ ~ ~5 ~ ~ dark_prismarine/setblock ~6 ~ ~ chest[facing=east]/fill ~-5 ~1 ~-1 ~5 ~1 ~-1 iron_bars/setblock ~-4 ~3 ~ dispenser[facing=down]/setblock ~ ~3 ~ dispenser[facing=down]/setblock ~4 ~3 ~ dispenser[facing=down]/summon armor_stand ~ ~1 ~ {Invisible:1b,NoGravity:1b,Marker:1b,Tags:["c9_cake","c9_init"]}/scoreboard players add #factory c9_tick 1/execute if score #factory c9_tick matches 50.. run scoreboard players set #factory c9_tick 0/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]}}/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]}}/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]}}/kill @e[type=armor_stand,tag=c9_init]/execute as @e[type=block_display,tag=c9_cake] at @s run tp @s ~0.08 ~ ~/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/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]}}/execute if score #factory c9_tick matches 18 run particle splash ~ ~2.2 ~ 0.2 0.3 0.2 0.1 25/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]}}/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/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}}/execute positioned ~5.5 ~1 ~ as @e[type=block_display,tag=c9_cake,distance=..0.5] run kill @sloop #3 Every 50 ticks (2.5 seconds), a new <code>block_display</code> entity is summoned at the start of the belt showing a scaled-down smooth sandstone slab to act as raw cake dough, with <code>teleport_duration:2</code> for smooth conveyor motion.loop #7 Slides every active cake entity 0.08 blocks east along the conveyor belt each tick. Combined with <code>teleport_duration</code>, this looks completely smooth instead of jerky.loop #9 When a dough display entity reaches within 0.5 blocks of the middle station (<code>~ ~1 ~</code>), <code>/data merge</code> transforms its block state into a taller quartz slab with a white glow to represent freshly applied icing.loop #11 When the iced cake reaches the third station at <code>~4 ~1 ~</code>, it transforms into a full-sized Minecraft cake block with a bright cherry-red glow.loop #13 At the end of the conveyor belt by the chest, the finished cake display spawns a real collectable cake item that hops upwards before the display entity is removed.


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.
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.
/kill @e[tag=c9_cake]/fill ~-6 ~ ~-1 ~6 ~3 ~1 air/scoreboard objectives remove c9_tickIn 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.
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.
/data/execute/fill/kill/particle/scoreboard/setblock/summon/tp
▶Steampunk Astrolabe GyroscopeMachines & MechanismsMedium24 cmds
▶Steampunk Printing Press Newspaper RollMachines & MechanismsHard24 cmds
▶Holographic Magnetic Tokamak Fusion ConfinementMachines & MechanismsExpert26 cmds
▶Kinematic Radial Aircraft Engine IgnitionMachines & MechanismsExpert24 cmds
▶Kinematic V8 Engine Piston CutawayMachines & MechanismsExpert24 cmds
▶Kinetic Moiré Pattern Interference SculptureMachines & MechanismsMedium23 cmds