Build a giant animated treasure chest using block display entities that creaks open on a timer and erupts with a fountain of glowing treasures.
Animated BlocksRoyalMedievalCelebrationGoldOrangeServer LobbyAdventure MapDecorationBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Sounds21+ commands
This command creation builds a massive 6x4x4 treasure chest out of scaled block display entities right in the middle of your world. Instead of sitting still like normal blocks, the whole upper lid smoothly hinges open using display transformation matrices and quaternion rotations.
Once the heavy lid swings back, the dark interior ignites with golden particles and erupts into a continuous fountain of glowing diamonds, emeralds, amethyst clusters, and enchanted gear before snapping shut and repeating the cycle.
/scoreboard objectives add c9_timer dummy/scoreboard players set #chest c9_timer 0/fill ~-4 ~-1 ~-3 ~4 ~-1 ~3 minecraft:stone_bricks/fill ~-3 ~-1 ~-2 ~3 ~-1 ~2 minecraft:gold_block/summon minecraft:block_display ~ ~ ~ {Tags:["c9_chest","c9_base"],block_state:{Name:"minecraft:stripped_dark_oak_wood"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[6f,2.5f,4f],translation:[-3f,0f,-2f]}}/summon minecraft:block_display ~ ~ ~ {Tags:["c9_chest","c9_base_trim"],block_state:{Name:"minecraft:gold_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[6.2f,0.4f,4.2f],translation:[-3.1f,2.1f,-2.1f]}}/summon minecraft:block_display ~ ~ ~ {Tags:["c9_chest","c9_interior"],block_state:{Name:"minecraft:black_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[5.6f,0.2f,3.6f],translation:[-2.8f,2.45f,-1.8f]}}/summon minecraft:block_display ~ ~2.5 ~-2 {Tags:["c9_chest","c9_lid"],block_state:{Name:"minecraft:stripped_dark_oak_wood"},interpolation_duration:25,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[6f,1.5f,4f],translation:[-3f,0f,0f]}}/summon minecraft:block_display ~ ~2.5 ~-2 {Tags:["c9_chest","c9_latch"],block_state:{Name:"minecraft:gold_block"},interpolation_duration:25,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,1.2f,0.4f],translation:[-0.4f,-0.5f,3.9f]}}/scoreboard players add #chest c9_timer 1/execute if score #chest c9_timer matches 160.. run scoreboard players set #chest c9_timer 0/execute if score #chest c9_timer matches 20 run data merge entity @e[type=minecraft:block_display,tag=c9_lid,limit=1] {start_interpolation:0,interpolation_duration:25,transformation:{left_rotation:[-0.5f,0f,0f,0.866f],right_rotation:[0f,0f,0f,1f],scale:[6f,1.5f,4f],translation:[-3f,0f,0f]}}/execute if score #chest c9_timer matches 20 run data merge entity @e[type=minecraft:block_display,tag=c9_latch,limit=1] {start_interpolation:0,interpolation_duration:25,transformation:{left_rotation:[-0.5f,0f,0f,0.866f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,1.2f,0.4f],translation:[-0.4f,-0.5f,3.9f]}}/execute if score #chest c9_timer matches 20 run playsound minecraft:block.chest.open master @a ~ ~2.5 ~ 2 0.6/execute if score #chest c9_timer matches 35..110 run particle minecraft:totem_of_undying ~ ~2.8 ~ 1.8 0.3 1.0 0.25 4 force/execute if score #chest c9_timer matches 35..110 run particle minecraft:dust{color:[1.0,0.85,0.1],scale:2.0} ~ ~2.7 ~ 2.0 0.2 1.2 0 5 force/execute if score #chest c9_timer matches 40..105 as @e[type=minecraft:block_display,tag=c9_interior,limit=1] run summon minecraft:item ~ ~2.6 ~ {Tags:["c9_loot"],Item:{id:"minecraft:diamond",count:1},Motion:[0.0,0.65,0.0],PickupDelay:32767,Age:5920,Glowing:1b}/execute if score #chest c9_timer matches 45..105 if entity @e[type=minecraft:item,tag=c9_loot,limit=8] run summon minecraft:item ~-1.2 ~2.6 ~0.4 {Tags:["c9_loot"],Item:{id:"minecraft:golden_apple",count:1},Motion:[-0.18,0.72,0.16],PickupDelay:32767,Age:5920,Glowing:1b}/execute if score #chest c9_timer matches 50..105 if entity @e[type=minecraft:item,tag=c9_loot,limit=8] run summon minecraft:item ~1.2 ~2.6 ~-0.4 {Tags:["c9_loot"],Item:{id:"minecraft:emerald",count:1},Motion:[0.18,0.72,-0.16],PickupDelay:32767,Age:5920,Glowing:1b}/execute if score #chest c9_timer matches 55..105 if entity @e[type=minecraft:item,tag=c9_loot,limit=8] run summon minecraft:item ~0.6 ~2.6 ~0.6 {Tags:["c9_loot"],Item:{id:"minecraft:amethyst_cluster",count:1},Motion:[0.14,0.78,0.2],PickupDelay:32767,Age:5920,Glowing:1b}/execute if score #chest c9_timer matches 60..105 if entity @e[type=minecraft:item,tag=c9_loot,limit=8] run summon minecraft:item ~-0.6 ~2.6 ~-0.6 {Tags:["c9_loot"],Item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},Motion:[-0.14,0.78,-0.2],PickupDelay:32767,Age:5920,Glowing:1b}/execute if score #chest c9_timer matches 130 run data merge entity @e[type=minecraft:block_display,tag=c9_lid,limit=1] {start_interpolation:0,interpolation_duration:15,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[6f,1.5f,4f],translation:[-3f,0f,0f]}}/execute if score #chest c9_timer matches 130 run data merge entity @e[type=minecraft:block_display,tag=c9_latch,limit=1] {start_interpolation:0,interpolation_duration:15,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.8f,1.2f,0.4f],translation:[-0.4f,-0.5f,3.9f]}}setup #8 The chest lid and gold latch are summoned at the back hinge coordinate (<code>~ ~2.5 ~-2</code>) rather than the centre. Because display entity rotations pivot around the entity's actual coordinates, offsetting the translation forward lets the entire lid and latch swing cleanly around the back edge like a real hinge.loop #3 At tick 20, <code>/data merge entity</code> updates the lid's <code>left_rotation</code> quaternion to <code>[-0.5f,0f,0f,0.866f]</code>, which equals a -60 degree tilt around the X axis. Setting <code>start_interpolation:0</code> and <code>interpolation_duration:25</code> tells the game client to animate the opening smoothly over 1.25 seconds.loop #8 While the chest is open, glowing loot items are launched upward with custom <code>Motion</code> vectors. Setting <code>Age:5920</code> causes each item to despawn automatically after 80 ticks (4 seconds) when it reaches age 6000, preventing lag without needing a kill loop.


Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A large custom treasure chest opens its lid and shoots out glowing arcs of loot items and golden 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 players actually collect the loot from the fountain, change PickupDelay:32767 in the five item summon commands to PickupDelay:10 and increase Age:5920 to Age:5400 so the items stay on the ground for 30 seconds before despawning. You can also replace the timer loop trigger with a player proximity check such as /execute if entity @a[distance=..6] so the chest only opens when an adventurer approaches it.
/kill @e[tag=c9_chest]/kill @e[tag=c9_loot]/scoreboard objectives remove c9_timer/fill ~-4 ~-1 ~-3 ~4 ~-1 ~3 minecraft:grass_blockBoth the lid and the gold latch are summoned at the exact same hinge point at the back of the chest (~ ~2.5 ~-2) and share the same rotation quaternion and interpolation duration, so they swing along the exact same arc.
No. Every summoned item has Age set to 5920, which means Minecraft automatically deletes it after 80 ticks (4 seconds) once its Age reaches 6000.
▶Castle Gate Opening SequenceAnimated BlocksEasy24 cmds
▶Crystal Chandelier Domino ShatterAnimated BlocksHard22 cmds
▶Grand Hinged Castle Gate & DrawbridgeAnimated BlocksMedium24 cmds
▶Morphing Banquet HallAnimated BlocksHard23 cmds
▶Waving Tricolor Banner DisplayAnimated BlocksEasy24 cmds
▶Plummeting Colossal ChandelierAnimated BlocksMedium24 cmds