Build a giant floating puzzle cube in Minecraft using block display entities that smoothly rotates its faces along all three axes to scramble and solve itself.
Animated BlocksTechnologyMysticRainbowDecorationMini-gameServer LobbyBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Sounds21+ commands
This command creation builds a massive 2x2x2 color puzzle cube floating in mid-air above a dark prismarine pedestal. Each corner cubie is made of a colorful glazed terracotta block display entity with glowing outlines and full brightness so the patterns stand out at night.
Using block display transformation matrices and smooth interpolation, the cube automatically picks faces along the X, Y, and Z axes and twists them 90 degrees at a time. After scrambling itself across three axes, it reverses every rotation step-by-step until the puzzle is completely solved, letting out a burst of particles and celebratory chimes.
/scoreboard objectives add c9_t dummy/fill ~-2 ~ ~-2 ~2 ~ ~2 dark_prismarine_slab[type=bottom]/setblock ~ ~ ~ sea_lantern/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_px","c9_py","c9_pz"],Glowing:1b,glow_color_override:16733525,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:red_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[0.05f,0.05f,0.05f]}}/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_nx","c9_py","c9_pz"],Glowing:1b,glow_color_override:16755200,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:orange_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[-1.65f,0.05f,0.05f]}}/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_px","c9_ny","c9_pz"],Glowing:1b,glow_color_override:16777045,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:yellow_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[0.05f,-1.65f,0.05f]}}/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_nx","c9_ny","c9_pz"],Glowing:1b,glow_color_override:5635925,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:lime_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[-1.65f,-1.65f,0.05f]}}/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_px","c9_py","c9_nz"],Glowing:1b,glow_color_override:5636095,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:cyan_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[0.05f,0.05f,-1.65f]}}/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_nx","c9_py","c9_nz"],Glowing:1b,glow_color_override:5592575,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:blue_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[-1.65f,0.05f,-1.65f]}}/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_px","c9_ny","c9_nz"],Glowing:1b,glow_color_override:16733695,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:magenta_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[0.05f,-1.65f,-1.65f]}}/summon block_display ~ ~5.5 ~ {Tags:["c9_cube","c9_nx","c9_ny","c9_nz"],Glowing:1b,glow_color_override:16777215,brightness:{sky:15,block:15},teleport_duration:10,interpolation_duration:14,block_state:{Name:"minecraft:white_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.6f,1.6f,1.6f],translation:[-1.65f,-1.65f,-1.65f]}}/scoreboard players add #tick c9_t 1/execute if score #tick c9_t matches 140.. run scoreboard players set #tick c9_t 1/execute if score #tick c9_t matches 1..70 run tp @e[tag=c9_cube] ~ ~5.8 ~ ~2 ~/execute if score #tick c9_t matches 71..140 run tp @e[tag=c9_cube] ~ ~5.2 ~ ~2 ~/particle end_rod ~ ~5.5 ~ 1.8 1.8 1.8 0.01 1 force/particle dust{color:[0.2,0.9,1.0],scale:1.2} ~ ~1.2 ~ 0.8 0.2 0.8 0 3 force/execute if score #tick c9_t matches 10 as @e[tag=c9_py] run data merge entity @s {start_interpolation:0,interpolation_duration:14,transformation:{left_rotation:[0f,0.7071068f,0f,0.7071068f]}}/execute if score #tick c9_t matches 30 as @e[tag=c9_px] run data merge entity @s {start_interpolation:0,interpolation_duration:14,transformation:{right_rotation:[0.7071068f,0f,0f,0.7071068f]}}/execute if score #tick c9_t matches 50 as @e[tag=c9_pz] run data merge entity @s {start_interpolation:0,interpolation_duration:14,transformation:{left_rotation:[0f,0f,0.7071068f,0.7071068f]}}/execute if score #tick c9_t matches 75 as @e[tag=c9_pz] run data merge entity @s {start_interpolation:0,interpolation_duration:14,transformation:{left_rotation:[0f,0f,0f,1f]}}/execute if score #tick c9_t matches 95 as @e[tag=c9_px] run data merge entity @s {start_interpolation:0,interpolation_duration:14,transformation:{right_rotation:[0f,0f,0f,1f]}}/execute if score #tick c9_t matches 115 as @e[tag=c9_py] run data merge entity @s {start_interpolation:0,interpolation_duration:14,transformation:{left_rotation:[0f,0f,0f,1f]}}/execute if score #tick c9_t matches 10..115 if score #tick c9_t matches 10 run playsound minecraft:block.piston.extend master @a ~ ~5.5 ~ 0.7 1.4/execute if score #tick c9_t matches 130 run particle totem_of_undying ~ ~5.5 ~ 1.2 1.2 1.2 0.15 35 forcesetup #4 Summons one of the eight corner cubies at the exact center point of the puzzle cube (~ ~5.5 ~). Its translation vector offsets the block outward by 0.05 or -1.65 so that rotating the entity's transformation pivots the block around the shared center of the 2x2x2 cube.loop #3 Gently bobs the entire puzzle cube up and down while rotating its yaw by 2 degrees every tick. Because the display entities have teleport_duration set to 10, this movement is smoothly interpolated.loop #7 Selects the four cubies on the top layer (tagged c9_py) and applies a 90-degree quaternion rotation around the Y axis over 14 ticks.loop #10 Begins the self-solving sequence by returning the front Z face (c9_pz), right X face (c9_px), and top Y face (c9_py) back to their identity quaternions in exact reverse order.loop #14 Fires a celebratory burst of green and gold totem particles when the final face clicks back into its solved state at tick 130.


Recorded on our own test server: 69 frames at about 9.8 fps. Our image check saw: A glowing 2x2x2 cube of colorful glazed terracotta blocks floats above a dark prismarine pedestal at night, with its left side shifting and rotating to change block positions while emitting 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 trigger the scramble and solve sequence manually instead of looping automatically, replace the automatic reset in loop command 2 with a right-click detection or a button wired to /scoreboard players set #tick c9_t 1, and only increment #tick while it is below 140.
/kill @e[tag=c9_cube]/scoreboard objectives remove c9_t/fill ~-2 ~ ~-2 ~2 ~ ~2 airAll eight block_display entities are summoned at the exact same coordinate (~ ~5.5 ~) and pushed outward into their 2x2x2 slots using the transformation translation vector. When left_rotation or right_rotation is updated, it pivots the translated block around the entity's origin at the center of the cube.
Yes! Lower the interpolation_duration value in the loop commands (for example from 14 to 6) for snappy speed-cube turns, or raise it to 25 for a slow, heavy mechanical turn.
/data/execute/fill/particle/playsound/scoreboard/setblock/summon/tp
▶Tesseract 4D Hypercube ProjectionAnimated BlocksExpert24 cmds
▶Floating Polyhedral Origami MorphAnimated BlocksExpert21 cmds
▶Holographic Chess Endgame Battle RoyalAnimated BlocksHard24 cmds
▶Hydraulic Origami Crane Folding MatrixAnimated BlocksHard24 cmds
▶Block Gravity SimulatorAnimated BlocksExpert22 cmds
▶Chromatic Shifting CubeAnimated BlocksEasy23 cmds