Build an automated suspended llama piñata in Minecraft Java that swings wildly on a wooden frame before bursting into fireworks, confetti, and candy loot.
Confetti & CelebrationCelebrationCuteRainbowPinkYellowMini-gameServer LobbyDecorationArmor standsFireworksRiding & passengersSummoned mobsBlock building (fill/setblock/clone)Sounds21+ commands
Nothing brings life to a celebration quite like a piñata. This command creation hangs a glowing, colorful llama from an oak beam. As the timer ticks, a party batter with an enchanted stick steps up and whacks the piñata, sending it swinging back and forth while shedding bright confetti particles and musical chimes.
After taking enough hits, the piñata reaches its limit and explodes into a multi-layered burst of star-shaped fireworks, colorful dust clouds, and flying candy loot including cookies, sweet berries, golden apples, and emeralds. Shortly after the treat shower settles, a fresh piñata drops in automatically so the party never stops.
/scoreboard objectives add c9_tick dummy/scoreboard players set #pinata c9_tick 0/fill ~-4 ~ ~ ~4 ~7 ~ oak_fence/fill ~-3 ~ ~ ~3 ~6 ~ air/fill ~-4 ~7 ~ ~4 ~7 ~ stripped_oak_wood[axis=x]/fill ~ ~5 ~ ~ ~6 ~ iron_chain/summon armor_stand ~ ~4.6 ~ {NoGravity:1b,Invisible:1b,Invulnerable:1b,Tags:["c9_anchor"]}/summon armor_stand ~-1.8 ~ ~0.6 {NoGravity:1b,Invulnerable:1b,ShowArms:1b,Rotation:[-60f,0f],Pose:{RightArm:[-90f,25f,0f]},equipment:{mainhand:{id:"minecraft:stick",count:1,components:{"minecraft:enchantment_glint_override":true}},head:{id:"minecraft:leather_helmet",count:1,components:{"minecraft:dyed_color":16755200}},chest:{id:"minecraft:leather_chestplate",count:1,components:{"minecraft:dyed_color":5636095}}},Tags:["c9_actor"]}/scoreboard players add #pinata c9_tick 1/execute if score #pinata c9_tick matches 131.. run scoreboard players set #pinata c9_tick 1/execute if score #pinata c9_tick matches 1 run summon llama ~ ~2.8 ~ {NoAI:1b,NoGravity:1b,Silent:1b,Invulnerable:1b,Glowing:1b,Variant:0,CustomName:'{"text":"Party Piñata","color":"light_purple","bold":true}',CustomNameVisible:1b,equipment:{body:{id:"minecraft:magenta_carpet",count:1}},Tags:["c9_pinata"]}/execute if score #pinata c9_tick matches 1 run playsound entity.chicken.egg master @a ~ ~3 ~ 1 0.8/execute if score #pinata c9_tick matches 1..89 as @e[tag=c9_pinata] at @s run particle dust{color:[1.0,0.8,0.2],scale:1.2} ~ ~0.8 ~ 0.35 0.35 0.35 0 1 force/execute if score #pinata c9_tick matches 15..85 as @e[tag=c9_pinata] run execute if score #pinata c9_tick matches 15 run tp @s ~0.55 ~2.9 ~-0.25 40 -15/execute if score #pinata c9_tick matches 30..85 as @e[tag=c9_pinata] run execute if score #pinata c9_tick matches 30 run tp @s ~-0.55 ~2.9 ~0.25 -40 15/execute if score #pinata c9_tick matches 45..85 as @e[tag=c9_pinata] run execute if score #pinata c9_tick matches 45 run tp @s ~0.75 ~3.1 ~0.45 80 -25/execute if score #pinata c9_tick matches 60..85 as @e[tag=c9_pinata] run execute if score #pinata c9_tick matches 60 run tp @s ~-0.75 ~3.1 ~-0.45 -80 25/execute if score #pinata c9_tick matches 75..85 as @e[tag=c9_pinata] run execute if score #pinata c9_tick matches 75 run tp @s ~0.85 ~3.3 ~-0.55 140 -35/execute if score #pinata c9_tick matches 15..75 as @e[tag=c9_pinata] at @s if score #pinata c9_tick matches 15 run particle totem_of_undying ~ ~0.7 ~ 0.4 0.4 0.4 0.25 25 force/execute if score #pinata c9_tick matches 45 as @e[tag=c9_pinata] at @s run playsound block.note_block.chime master @a ~ ~ ~ 1 1.5/execute if score #pinata c9_tick matches 90 as @e[tag=c9_pinata] at @s run summon firework_rocket ~ ~0.7 ~ {LifeTime:0,FireworksItem:{id:"minecraft:firework_rocket",count:1,components:{"minecraft:fireworks":{flight_duration:1,explosions:[{shape:"large_ball",has_twinkle:1b,has_trail:1b,colors:[I;16711935,65535,16776960],fade_colors:[I;16733525]},{shape:"star",has_twinkle:1b,colors:[I;5635925,16755200]}]}}}}/execute if score #pinata c9_tick matches 90 as @e[tag=c9_pinata] at @s run summon area_effect_cloud ~ ~0.7 ~ {Duration:5,Radius:0.1f,Passengers:[{id:"minecraft:item",Motion:[0.22,0.4,0.12],Item:{id:"minecraft:cookie",count:1},Age:5940},{id:"minecraft:item",Motion:[-0.22,0.45,-0.12],Item:{id:"minecraft:sweet_berries",count:1},Age:5940},{id:"minecraft:item",Motion:[0.12,0.5,-0.22],Item:{id:"minecraft:golden_apple",count:1},Age:5940},{id:"minecraft:item",Motion:[-0.12,0.4,0.22],Item:{id:"minecraft:emerald",count:1},Age:5940},{id:"minecraft:item",Motion:[0.25,0.35,-0.18],Item:{id:"minecraft:amethyst_shard",count:1},Age:5940},{id:"minecraft:item",Motion:[-0.25,0.45,0.18],Item:{id:"minecraft:glow_berries",count:1},Age:5940}]}/execute if score #pinata c9_tick matches 90 run tp @e[tag=c9_pinata] ~ ~-200 ~/execute if score #pinata c9_tick matches 90 run kill @e[tag=c9_pinata]loop #3 At the start of each 130-tick cycle, a glowing llama wearing a magenta carpet is summoned mid-air beneath the iron chain.loop #6 Specific tick milestones teleport the piñata slightly off-center with tilted pitch and yaw rotations, creating the illusion of it swinging wildly after each hit.loop #13 At tick 90, an instant firework rocket with a <code>LifeTime:0</code> tag and both large ball and star explosions is summoned right inside the llama.loop #14 A short-lived <code>area_effect_cloud</code> spawns six different candy and treasure items at once with outward velocity and an <code>Age</code> of 5940 so they despawn cleanly after 3 seconds.loop #15 Before removing the llama, it is teleported 200 blocks down so it disappears cleanly without showing a red death animation or dropping leather.


Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A glowing llama hangs from a wooden frame above an armor stand holding an enchanted stick, swinging and bursting with colorful confetti 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 hit the piñata instead of running on an automatic timer, remove the first two clock commands and create a scoreboard objective with /scoreboard objectives add c9_hit minecraft.custom:minecraft.damage_dealt. Advance #pinata c9_tick whenever a player deals damage near @e[tag=c9_pinata,distance=..4], and remove the Age:5940 tag from the spawned items so players have plenty of time to pick up the candy and gems.
/kill @e[tag=c9_pinata]/kill @e[tag=c9_anchor]/kill @e[tag=c9_actor]/fill ~-4 ~ ~ ~4 ~7 ~ air/scoreboard objectives remove c9_tickEach item is summoned with an Age value of 5940 out of 6000 ticks so it automatically despawns after 3 seconds, keeping your world lag-free during continuous loops.
Yes! Change magenta_carpet in the third loop command to any other wool carpet color, and change Variant:0 to a number between 0 and 3 to pick different llama coat colors.
▶Automated Firecracker ShowConfetti & CelebrationEasy20 cmds
▶Festive Confetti Cannon SaluteConfetti & CelebrationEasy23 cmds
▶Giant Jackpot Slot MachineConfetti & CelebrationMedium24 cmds
▶New Year Crystal Ball DropConfetti & CelebrationHard24 cmds
▶Giant Champagne Pop Confetti CelebrationConfetti & CelebrationMedium24 cmds
▶Ascending Lantern Sky ReleaseFirework ShowsEasy24 cmds