Build an automated crystalline capsule machine in vanilla Minecraft where orbiting amethyst capsules drop and crack open on an anvil to reveal glowing prizes.
Machines & MechanismsCelebrationMysticTechnologyPurpleGreenOrangeServer LobbyMini-gameDecorationItem displaysText displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Glowing outlinesRotation math21+ commands
The Crystalline Capsule Prize Machine turns a corner of your world into a glowing arcade display using only vanilla command blocks and display entities. Inside an open copper and sea-lantern frame, three amethyst capsules orbit around the top dome before a central geode drops down onto the anvil pedestal.
When the capsule hits the anvil, it bursts in a cloud of particles and reveals a rotating prize that cycles between a golden Nether Star, a bright Diamond Block, and an Emerald Block before resetting for the next draw.
/scoreboard objectives add c9_timer dummy/scoreboard objectives add c9_tier dummy/fill ~-2 ~ ~-2 ~2 ~ ~2 polished_deepslate_slab[type=bottom]/fill ~-1 ~ ~-1 ~1 ~5 ~1 waxed_copper_grate/fill ~-1 ~ ~-1 ~1 ~ ~1 waxed_chiseled_copper/fill ~-1 ~5 ~-1 ~1 ~5 ~1 waxed_cut_copper_slab[type=bottom]/fill ~ ~1 ~-1 ~ ~4 ~1 air/fill ~-1 ~1 ~ ~1 ~4 ~ air/setblock ~ ~ ~ sea_lantern/setblock ~ ~1 ~ anvil/execute unless entity @e[tag=c9_core] run summon text_display ~ ~4.6 ~ {Tags:["c9_m","c9_core"],billboard:"center",background:0,text:{text:"★ CAPSULE PRIZE ★",color:"gold",bold:true},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.6f,1.6f,1.6f]}}/execute unless entity @e[tag=c9_orb] run summon item_display ~ ~3.8 ~ {Tags:["c9_m","c9_orb"],Glowing:1b,glow_color_override:11141375,item:{id:"minecraft:amethyst_cluster"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0.85f,0f,0f],scale:[0.6f,0.6f,0.6f]}}/execute unless entity @e[tag=c9_orb2] run summon item_display ~ ~3.8 ~ {Tags:["c9_m","c9_orb2"],Rotation:[120f,0f],Glowing:1b,glow_color_override:5636095,item:{id:"minecraft:amethyst_cluster"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0.85f,0f,0f],scale:[0.6f,0.6f,0.6f]}}/execute unless entity @e[tag=c9_orb3] run summon item_display ~ ~3.8 ~ {Tags:["c9_m","c9_orb3"],Rotation:[240f,0f],Glowing:1b,glow_color_override:16733695,item:{id:"minecraft:amethyst_cluster"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0.85f,0f,0f],scale:[0.6f,0.6f,0.6f]}}/execute unless entity @e[tag=c9_cap] run summon item_display ~ ~2.0 ~ {Tags:["c9_m","c9_cap"],Glowing:1b,glow_color_override:11141375,item:{id:"minecraft:budding_amethyst"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,1.7f,0f],scale:[0.75f,0.75f,0.75f]}}/execute unless entity @e[tag=c9_prize] run summon item_display ~ ~2.0 ~ {Tags:["c9_m","c9_prize"],Glowing:1b,glow_color_override:16766720,item:{id:"minecraft:nether_star"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.45f,0f],scale:[0f,0f,0f]}}/scoreboard players add @e[tag=c9_core] c9_timer 1/execute as @e[tag=c9_m] at @s run tp @s ~ ~ ~ ~10 ~/particle dust{color:[0.85,0.3,1.0],scale:1.4} ~ ~3.7 ~ 0.55 0.35 0.55 0 3 force/execute if score @e[tag=c9_core,limit=1] c9_timer matches 5 run data merge entity @e[tag=c9_cap,limit=1] {interpolation_duration:18,start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.3f,0f],scale:[0.85f,0.85f,0.85f]}}/execute if score @e[tag=c9_core,limit=1] c9_timer matches 25 run data merge entity @e[tag=c9_cap,limit=1] {interpolation_duration:3,start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.3f,0f],scale:[0f,0f,0f]}}/execute if score @e[tag=c9_core,limit=1] c9_timer matches 25 run particle totem_of_undying ~ ~2.4 ~ 0.3 0.3 0.3 0.35 35 force/execute if score @e[tag=c9_core,limit=1] c9_timer matches 25 run data merge entity @e[tag=c9_prize,limit=1] {interpolation_duration:7,start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.55f,0f],scale:[1.25f,1.25f,1.25f]}}/execute if score @e[tag=c9_core,limit=1] c9_timer matches 75.. run kill @e[tag=c9_m]setup #4 Builds the outer pillars using <code>waxed_copper_grate</code> blocks, which let you see right into the machine when the middle faces are hollowed out.loop #2 Summons the orbiting amethyst cluster capsules with an X translation offset of <code>0.85f</code> so that rotating the entity in place causes the crystal to orbit around the top chamber.loop #10 At tick 5, uses <code>interpolation_duration:18</code> to smoothly drop the central <code>budding_amethyst</code> capsule from the upper dome onto the anvil below.loop #13 At tick 25, pops open the capsule with a burst of <code>totem_of_undying</code> particles and scales the glowing Nether Star prize up to <code>1.25f</code> above the anvil.


Recorded on our own test server: 48 frames at about 9.4 fps. Our image check saw: A copper structure containing an anvil pedestal with three glowing amethyst clusters orbiting above a rotating, glowing Nether Star prize surrounded by purple and green particles.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To let real players operate the machine on demand instead of running on an automatic loop, remove the automatic timer increment in loop command 7 and instead run /scoreboard players add @e[tag=c9_core] c9_timer 1 only when a player presses a button or holds a token item near the machine, and grant the player the prize item at tick 25 with /give @p nether_star.
/kill @e[tag=c9_m]/fill ~-2 ~ ~-2 ~2 ~5 ~2 air/scoreboard objectives remove c9_timer/scoreboard objectives remove c9_tierEdit loop command 6 and replace minecraft:nether_star in the item field with any item ID you like, such as minecraft:diamond_sword or minecraft:enchanted_golden_apple.
Each crystal is an item_display with a horizontal translation offset of 0.85 blocks, so simply rotating the entity's yaw every tick swings the model around the centre point.
/data/execute/fill/kill/particle/scoreboard/setblock/summon/tp
▶Holographic Pinball Machine Autonomous JackpotMachines & MechanismsHard24 cmds
▶Automated 3D Block PrinterMachines & MechanismsHard24 cmds
▶Automated Geometric Circle BuilderMachines & MechanismsMedium20 cmds
▶Automated Jackpot ReelsMachines & MechanismsMedium24 cmds
▶Automatic Block Circle GeneratorMachines & MechanismsEasy24 cmds
▶Autonomous Jukebox & Musical Light ShowMachines & MechanismsMedium24 cmds