Watch the classic Tower of Hanoi puzzle solve itself in Minecraft using glowing block displays, smooth interpolation, and a scoreboard timer.
SimulationsMysticTechnologyGoldWhitePurpleLearningDecorationServer LobbyBlock displaysSmooth animation (interpolation)Riding & passengersBlock building (fill/setblock/clone)21+ commands
This command creation builds an obsidian and gold dais holding three quartz pillars and three glowing concrete rings of different sizes. Powered by a scoreboard clock and block display interpolation, the rings autonomously levitate, glide across the pillars, and stack themselves to solve the classic 3-disk Tower of Hanoi puzzle in 7 moves.
Each ring glows in the dark with a custom color outline while floating particles highlight the active movement across the stage.
/scoreboard objectives add c9_tick dummy/scoreboard players set #t c9_tick 0/fill ~-9 ~ ~-3 ~9 ~ ~3 crying_obsidian/fill ~-8 ~ ~-2 ~8 ~ ~2 obsidian/fill ~-6 ~ ~0 ~6 ~ ~0 gold_block/summon block_display ~ ~ ~ {Tags:["c9_obj","c9_pillars"],Passengers:[{id:"minecraft:block_display",Tags:["c9_obj"],block_state:{Name:"minecraft:quartz_pillar"},transformation:{translation:[-6.3f,1.0f,-0.3f],scale:[0.6f,4.5f,0.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_obj"],block_state:{Name:"minecraft:quartz_pillar"},transformation:{translation:[-0.3f,1.0f,-0.3f],scale:[0.6f,4.5f,0.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_obj"],block_state:{Name:"minecraft:quartz_pillar"},transformation:{translation:[5.7f,1.0f,-0.3f],scale:[0.6f,4.5f,0.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_obj"],block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[-6.4f,5.5f,-0.4f],scale:[0.8f,0.4f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_obj"],block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[-0.4f,5.5f,-0.4f],scale:[0.8f,0.4f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_obj"],block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[5.6f,5.5f,-0.4f],scale:[0.8f,0.4f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}/summon block_display ~ ~ ~ {Tags:["c9_obj","c9_ring","c9_r3"],Glowing:1b,glow_color_override:16724787,interpolation_duration:7,block_state:{Name:"minecraft:magenta_concrete"},transformation:{translation:[-7.75f,1.0f,-1.75f],scale:[3.5f,0.8f,3.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/summon block_display ~ ~ ~ {Tags:["c9_obj","c9_ring","c9_r2"],Glowing:1b,glow_color_override:16755200,interpolation_duration:7,block_state:{Name:"minecraft:orange_concrete"},transformation:{translation:[-7.25f,1.8f,-1.25f],scale:[2.5f,0.8f,2.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/summon block_display ~ ~ ~ {Tags:["c9_obj","c9_ring","c9_r1"],Glowing:1b,glow_color_override:5636095,interpolation_duration:7,block_state:{Name:"minecraft:cyan_concrete"},transformation:{translation:[-6.85f,2.6f,-0.85f],scale:[1.7f,0.8f,1.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/scoreboard players add #t c9_tick 1/execute if score #t c9_tick matches 150.. run scoreboard players set #t c9_tick 1/execute if score #t c9_tick matches 1 run data merge entity @e[tag=c9_r3,limit=1] {start_interpolation:0,transformation:{translation:[-7.75f,1.0f,-1.75f],scale:[3.5f,0.8f,3.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 1 run data merge entity @e[tag=c9_r2,limit=1] {start_interpolation:0,transformation:{translation:[-7.25f,1.8f,-1.25f],scale:[2.5f,0.8f,2.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 1 run data merge entity @e[tag=c9_r1,limit=1] {start_interpolation:0,transformation:{translation:[-6.85f,2.6f,-0.85f],scale:[1.7f,0.8f,1.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 12 run data merge entity @e[tag=c9_r1,limit=1] {start_interpolation:0,transformation:{translation:[5.15f,6.2f,-0.85f],scale:[1.7f,0.8f,1.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 20 run data merge entity @e[tag=c9_r1,limit=1] {start_interpolation:0,transformation:{translation:[5.15f,1.0f,-0.85f],scale:[1.7f,0.8f,1.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 32 run data merge entity @e[tag=c9_r2,limit=1] {start_interpolation:0,transformation:{translation:[-1.25f,6.2f,-1.25f],scale:[2.5f,0.8f,2.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 40 run data merge entity @e[tag=c9_r2,limit=1] {start_interpolation:0,transformation:{translation:[-1.25f,1.0f,-1.25f],scale:[2.5f,0.8f,2.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 52 run data merge entity @e[tag=c9_r1,limit=1] {start_interpolation:0,transformation:{translation:[-0.85f,1.8f,-0.85f],scale:[1.7f,0.8f,1.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 68 run data merge entity @e[tag=c9_r3,limit=1] {start_interpolation:0,transformation:{translation:[4.25f,1.0f,-1.75f],scale:[3.5f,0.8f,3.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 84 run data merge entity @e[tag=c9_r1,limit=1] {start_interpolation:0,transformation:{translation:[-6.85f,1.0f,-0.85f],scale:[1.7f,0.8f,1.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 100 run data merge entity @e[tag=c9_r2,limit=1] {start_interpolation:0,transformation:{translation:[4.75f,1.8f,-1.25f],scale:[2.5f,0.8f,2.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 116 run data merge entity @e[tag=c9_r1,limit=1] {start_interpolation:0,transformation:{translation:[5.15f,2.6f,-0.85f],scale:[1.7f,0.8f,1.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}setup #6 Summons a compound <code>block_display</code> structure using <code>Passengers</code> to create the three quartz pillars and sea lantern caps in a single command.setup #7 Summons the largest magenta ring (<code>c9_r3</code>) with <code>Glowing:1b</code>, a custom <code>glow_color_override</code>, and an <code>interpolation_duration</code> of 7 ticks for smooth gliding.loop #1 Advances the <code>#t</code> timer on the <code>c9_tick</code> scoreboard by 1 every tick (20 times per second), driving the animation timeline.loop #6 At tick 12, updates the smallest cyan ring's <code>transformation.translation</code> and sets <code>start_interpolation:0</code> so it smoothly glides up and across to the right pillar.loop #14 At tick 116, places the smallest cyan ring on top of the stack on the right pillar, completing the 7-step Tower of Hanoi solution before the cycle resets at tick 150.


Recorded on our own test server: 67 frames at about 9.6 fps. Our image check saw: A crying obsidian and gold platform with three pillars and three differently sized glowing blocks moving between them to solve the Tower of Hanoi puzzle.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
/kill @e[tag=c9_obj]/fill ~-9 ~ ~-3 ~9 ~ ~3 air/scoreboard objectives remove c9_tickBlock displays support native client-side interpolation. By setting interpolation_duration to 7 ticks on summon and passing start_interpolation:0 whenever we merge a new translation vector, Minecraft automatically animates the transition between the two positions.
Yes. Adjust the interpolation_duration value on the three ring summon commands and scale the tick numbers in the loop commands proportionally.
▶Four-Dimensional Hypercube Tesseract RotationSimulationsExpert24 cmds
▶Harmonic Pendulum Wave ArraySimulationsMedium24 cmds
▶Alchemical Homunculus Vitro GenesisSimulationsHard25 cmds
▶Recursive Clone MeltdownSimulationsEasy17 cmds
▶Evolving Cellular Grid SimulationSimulationsMedium24 cmds
▶Pattern-Weaving Grid WalkerSimulationsEasy20 cmds