Build a giant animated mechanical music box in vanilla Minecraft where rotating copper pins physically pluck golden comb teeth to play a continuous melody.
Machines & MechanismsMusicIndustrialOrangeGoldDecorationServer LobbyBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Sounds21+ commands
This command creation builds a working oversized mechanical music box right in the middle of your world. A brass-and-copper cylinder spins continuously while glowing pins travel over the top and strike five golden comb teeth in sequence.
Each time a pin reaches the front edge, the corresponding tooth vibrates downward, releases musical note particles, and plays a chime harmony. Everything uses vanilla block display entities and scoreboard timing with zero mods or resource packs.
/scoreboard objectives add c9_t dummy/fill ~-4 ~ ~-2 ~4 ~ ~2 dark_oak_planks/fill ~-4 ~1 ~-2 ~-4 ~3 ~-2 gold_block/fill ~4 ~1 ~-2 ~4 ~3 ~-2 gold_block/summon block_display ~ ~2.5 ~-0.5 {Tags:["c9_mb","c9_cyl"],transformation:{translation:[-3.0f,-0.8f,-0.8f],scale:[6.0f,1.6f,1.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:copper_block"}}/summon block_display ~ ~2.5 ~1.2 {Tags:["c9_mb","c9_bar"],transformation:{translation:[-3.2f,-0.3f,-0.2f],scale:[6.4f,0.4f,0.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:iron_block"}}/summon block_display ~-2 ~2.5 ~0.4 {Tags:["c9_mb","c9_tooth","c9_t1"],Glowing:1b,glow_color_override:16766720,transformation:{translation:[-0.15f,-0.05f,0f],scale:[0.3f,0.1f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:gold_block"}}/summon block_display ~-1 ~2.5 ~0.4 {Tags:["c9_mb","c9_tooth","c9_t2"],Glowing:1b,glow_color_override:16766720,transformation:{translation:[-0.15f,-0.05f,0f],scale:[0.3f,0.1f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:gold_block"}}/summon block_display ~ ~2.5 ~0.4 {Tags:["c9_mb","c9_tooth","c9_t3"],Glowing:1b,glow_color_override:16766720,transformation:{translation:[-0.15f,-0.05f,0f],scale:[0.3f,0.1f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:gold_block"}}/summon block_display ~1 ~2.5 ~0.4 {Tags:["c9_mb","c9_tooth","c9_t4"],Glowing:1b,glow_color_override:16766720,transformation:{translation:[-0.15f,-0.05f,0f],scale:[0.3f,0.1f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:gold_block"}}/execute unless entity @e[tag=c9_t5] run summon block_display ~2 ~2.5 ~0.4 {Tags:["c9_mb","c9_tooth","c9_t5"],Glowing:1b,glow_color_override:16766720,transformation:{translation:[-0.15f,-0.05f,0f],scale:[0.3f,0.1f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:gold_block"}}/scoreboard players add #c9_clk c9_t 1/execute if score #c9_clk c9_t matches 100.. run scoreboard players set #c9_clk c9_t 0/execute as @e[tag=c9_tooth] run data merge entity @s {interpolation_duration:2,start_interpolation:0,transformation:{translation:[-0.15f,-0.05f,0f],scale:[0.3f,0.1f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #c9_clk c9_t matches 1 run summon block_display ~-2 ~3.3 ~-1.1 {Tags:["c9_mb","c9_pin"],Glowing:1b,glow_color_override:16755200,transformation:{translation:[-0.1f,-0.1f,-0.1f],scale:[0.2f,0.2f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:lightning_rod"}}/execute if score #c9_clk c9_t matches 21 run summon block_display ~ ~3.3 ~-1.1 {Tags:["c9_mb","c9_pin"],Glowing:1b,glow_color_override:16755200,transformation:{translation:[-0.1f,-0.1f,-0.1f],scale:[0.2f,0.2f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:lightning_rod"}}/execute if score #c9_clk c9_t matches 41 run summon block_display ~2 ~3.3 ~-1.1 {Tags:["c9_mb","c9_pin"],Glowing:1b,glow_color_override:16755200,transformation:{translation:[-0.1f,-0.1f,-0.1f],scale:[0.2f,0.2f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:lightning_rod"}}/execute if score #c9_clk c9_t matches 61 run summon block_display ~1 ~3.3 ~-1.1 {Tags:["c9_mb","c9_pin"],Glowing:1b,glow_color_override:16755200,transformation:{translation:[-0.1f,-0.1f,-0.1f],scale:[0.2f,0.2f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:lightning_rod"}}/execute if score #c9_clk c9_t matches 81 run summon block_display ~-1 ~3.3 ~-1.1 {Tags:["c9_mb","c9_pin"],Glowing:1b,glow_color_override:16755200,transformation:{translation:[-0.1f,-0.1f,-0.1f],scale:[0.2f,0.2f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:lightning_rod"}}/execute as @e[tag=c9_pin] at @s run tp @s ~ ~-0.028 ~0.05/execute as @e[tag=c9_pin] at @s if entity @e[tag=c9_tooth,distance=..0.35] run particle note ~ ~0.3 ~ 0.1 0.1 0.1 1 2 force/execute as @e[tag=c9_pin] at @s if entity @e[tag=c9_tooth,distance=..0.35] run playsound block.note_block.chime master @a ~ ~ ~ 1.5 1.2/execute as @e[tag=c9_tooth] at @s if entity @e[tag=c9_pin,distance=..0.35] run data merge entity @s {interpolation_duration:1,start_interpolation:0,transformation:{translation:[-0.15f,-0.25f,0f],scale:[0.3f,0.1f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute as @e[tag=c9_pin] at @s if entity @e[tag=c9_bar,distance=..1.4] run kill @ssetup #5 Summons the giant copper drum cylinder using a scaled <code>block_display</code> entity centered above the dark oak base.setup #7 Creates the individual glowing golden comb teeth positioned right in front of the rotating drum.loop #5 Every 20 ticks on the <code>c9_t</code> clock, a glowing pin spawns on top of the cylinder in one of five lanes to form a continuous five-note arpeggio.loop #10 Moves each pin forward and downward along the curvature of the cylinder face toward the comb teeth.loop #13 When a pin comes within 0.35 blocks of a comb tooth, the tooth deflects downward using display interpolation while playing a chime sound and spawning a note particle.


Recorded on our own test server: 60 frames at about 9.8 fps. Our image check saw: A large mechanical music box with a reddish cylinder, five glowing golden teeth, moving pins, and musical note particles when pins hit the teeth.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To make the music box play only when a player winds it up, add execute if entity @a[distance=..8] run in front of the second loop command (/scoreboard players add #c9_clk c9_t 1). The cylinder pins will pause whenever players walk away and resume when someone comes close.
/kill @e[tag=c9_mb]/fill ~-4 ~ ~-2 ~4 ~3 ~2 air/scoreboard objectives remove c9_tYes! Replace block.note_block.chime in loop command 12 with any other note block sound such as block.note_block.harp or block.note_block.bell, and adjust the pitch value at the end of the command.
No. Loop command 14 immediately removes each pin right after it plucks a comb tooth, so there are never more than two or three pins alive at once.
/data/execute/fill/kill/particle/playsound/scoreboard/summon/tp
▶Steampunk Astrolabe GyroscopeMachines & MechanismsMedium24 cmds
▶Steampunk Printing Press Newspaper RollMachines & MechanismsHard24 cmds
▶Victorian Carousel of Mythical BeastsMachines & MechanismsHard24 cmds
▶Victorian Phonograph Soundwave VisualizerMachines & MechanismsMedium24 cmds
▶Gothic Cathedral Organ Pipe SymphonyMachines & MechanismsHard22 cmds
▶Holographic Magnetic Tokamak Fusion ConfinementMachines & MechanismsExpert26 cmds