Explosive Confetti Piñata

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.

Java EditionFireworks & Light ShowsEasy24 commandsTested on a real 26.2 & 26.3 server
A glowing llama piñata hangs from a wooden frame surrounded by colorful confetti particles. Download the GIF Video & GIF © www.9minecraft.net

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.

1. Setup - type these once 8 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /scoreboard players set #pinata c9_tick 0
  3. /fill ~-4 ~ ~ ~4 ~7 ~ oak_fence
  4. /fill ~-3 ~ ~ ~3 ~6 ~ air
  5. /fill ~-4 ~7 ~ ~4 ~7 ~ stripped_oak_wood[axis=x]
  6. /fill ~ ~5 ~ ~ ~6 ~ iron_chain
  7. /summon armor_stand ~ ~4.6 ~ {NoGravity:1b,Invisible:1b,Invulnerable:1b,Tags:["c9_anchor"]}
  8. /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"]}

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

  1. /scoreboard players add #pinata c9_tick 1
  2. /execute if score #pinata c9_tick matches 131.. run scoreboard players set #pinata c9_tick 1
  3. /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"]}
  4. /execute if score #pinata c9_tick matches 1 run playsound entity.chicken.egg master @a ~ ~3 ~ 1 0.8
  5. /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
  6. /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
  7. /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
  8. /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
  9. /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
  10. /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
  11. /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
  12. /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
  13. /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]}]}}}}
  14. /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}]}
  15. /execute if score #pinata c9_tick matches 90 run tp @e[tag=c9_pinata] ~ ~-200 ~
  16. /execute if score #pinata c9_tick matches 90 run kill @e[tag=c9_pinata]

How it works

Frames from the test run

Explosive Confetti Piñata - frame 1Explosive Confetti Piñata - frame 2Explosive Confetti Piñata - frame 3

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.

Build it in your world

  1. Stand in the center of a flat open area where you want your piñata frame to stand.
  2. Run each of the 8 setup commands in chat to build the wooden beam, iron chain, and party batter armor stand.
  3. Place a line of 14 repeating command blocks (or 1 repeating followed by 13 chain command blocks) nearby.
  4. Set all the command blocks to Always Active and paste the loop commands into them in order.
  5. Watch the piñata spawn, swing back and forth as confetti bursts around it, and explode into fireworks and treats every 6.5 seconds.

Use it with real players

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.

Remove it again 5 commands

  1. /kill @e[tag=c9_pinata]
  2. /kill @e[tag=c9_anchor]
  3. /kill @e[tag=c9_actor]
  4. /fill ~-4 ~ ~ ~4 ~7 ~ air
  5. /scoreboard objectives remove c9_tick

FAQ

Why do the dropped treats and emeralds disappear after a few seconds?

Each 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.

Can I change the carpet color or llama coat color?

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.

Commands used

/execute/fill/kill/particle/playsound/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides