A dark obsidian emitter fires a bright white laser into a spinning triangular glass prism, refracting into seven sweeping neon rainbow beams in the night.
Light Beams & LasersTechnologyHoly & LightMysticRainbowWhiteBlackDecorationLearningServer LobbyBlock displaysArmor standsSmooth animation (interpolation)Riding & passengersSummoned mobsBlock building (fill/setblock/clone)Glowing outlinesRotation math21+ commands
This command creation builds an optical physics experiment right on your stage. A dark obsidian emitter tower fires a concentrated white laser beam into a floating, rotating triangular glass prism suspended over a central pedestal.
As the prism spins, the white light refracts out the opposite side and splits into seven distinct neon rainbow rays. Each colored beam sweeps smoothly back and forth through the night air while glowing particles trail along the light paths.
/scoreboard objectives add c9time dummy/fill ~-14 ~0 ~-1 ~-13 ~4 ~1 minecraft:obsidian/fill ~-1 ~0 ~-1 ~1 ~0 ~1 minecraft:obsidian/summon minecraft:armor_stand ~ ~4 ~ {Invisible:1b,NoGravity:1b,Tags:["c9_hub"],Passengers:[{id:"minecraft:block_display",Tags:["c9_p","c9_prism"],Rotation:[0f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:16777215,block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-1.3f,-1.8f,0.68f],scale:[2.6f,3.6f,0.18f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_prism"],Rotation:[120f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:16777215,block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-1.3f,-1.8f,0.68f],scale:[2.6f,3.6f,0.18f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_prism"],Rotation:[240f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:16777215,block_state:{Name:"minecraft:cyan_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-1.3f,-1.8f,0.68f],scale:[2.6f,3.6f,0.18f]}}]}/summon minecraft:armor_stand ~ ~4 ~ {Invisible:1b,NoGravity:1b,Tags:["c9_hub"],Passengers:[{id:"minecraft:block_display",Tags:["c9_p","c9_prism"],Rotation:[0f,0f],brightness:{sky:15,block:15},teleport_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[1.21f,-1.85f,0.66f],scale:[0.22f,3.7f,0.22f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_prism"],Rotation:[120f,0f],brightness:{sky:15,block:15},teleport_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[1.21f,-1.85f,0.66f],scale:[0.22f,3.7f,0.22f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_prism"],Rotation:[240f,0f],brightness:{sky:15,block:15},teleport_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[1.21f,-1.85f,0.66f],scale:[0.22f,3.7f,0.22f]}}]}/summon minecraft:armor_stand ~ ~4 ~ {Invisible:1b,NoGravity:1b,Tags:["c9_hub"],Passengers:[{id:"minecraft:block_display",Tags:["c9_p"],brightness:{sky:15,block:15},block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-12.6f,-0.45f,-0.45f],scale:[0.8f,0.9f,0.9f]}},{id:"minecraft:block_display",Tags:["c9_p"],brightness:{sky:15,block:15},Glowing:1b,glow_color_override:16777215,block_state:{Name:"minecraft:white_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-11.9f,-0.15f,-0.15f],scale:[11.9f,0.3f,0.3f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_ray","c9_r1"],Rotation:[-132f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:16724787,block_state:{Name:"minecraft:red_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.12f,-0.12f,0.3f],scale:[0.24f,0.24f,14.5f]}}]}/summon minecraft:armor_stand ~ ~4 ~ {Invisible:1b,NoGravity:1b,Tags:["c9_hub"],Passengers:[{id:"minecraft:block_display",Tags:["c9_p","c9_ray","c9_r2"],Rotation:[-122f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:16744448,block_state:{Name:"minecraft:orange_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.12f,-0.12f,0.3f],scale:[0.24f,0.24f,14.5f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_ray","c9_r3"],Rotation:[-112f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:16770560,block_state:{Name:"minecraft:yellow_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.12f,-0.12f,0.3f],scale:[0.24f,0.24f,14.5f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_ray","c9_r4"],Rotation:[-102f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:3342130,block_state:{Name:"minecraft:lime_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.12f,-0.12f,0.3f],scale:[0.24f,0.24f,14.5f]}}]}/summon minecraft:armor_stand ~ ~4 ~ {Invisible:1b,NoGravity:1b,Tags:["c9_hub"],Passengers:[{id:"minecraft:block_display",Tags:["c9_p","c9_ray","c9_r5"],Rotation:[-92f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:58879,block_state:{Name:"minecraft:cyan_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.12f,-0.12f,0.3f],scale:[0.24f,0.24f,14.5f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_ray","c9_r6"],Rotation:[-82f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:3368703,block_state:{Name:"minecraft:blue_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.12f,-0.12f,0.3f],scale:[0.24f,0.24f,14.5f]}},{id:"minecraft:block_display",Tags:["c9_p","c9_ray","c9_r7"],Rotation:[-72f,0f],brightness:{sky:15,block:15},teleport_duration:1,Glowing:1b,glow_color_override:13379583,block_state:{Name:"minecraft:magenta_concrete"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.12f,-0.12f,0.3f],scale:[0.24f,0.24f,14.5f]}}]}/execute as @e[tag=c9_p] run ride @s dismount/kill @e[tag=c9_hub]/scoreboard players add #t c9time 1/execute if score #t c9time matches 80.. run scoreboard players set #t c9time 0/execute as @e[tag=c9_prism] at @s run tp @s ~ ~ ~ ~3 ~/execute if score #t c9time matches 0..39 as @e[tag=c9_ray] at @s run tp @s ~ ~ ~ ~1.2 ~/execute if score #t c9time matches 40..79 as @e[tag=c9_ray] at @s run tp @s ~ ~ ~ ~-1.2 ~/particle minecraft:end_rod ~-6 ~4 ~ 2.2 0.04 0.04 0.004 4/particle minecraft:firework ~ ~4 ~ 0.25 0.4 0.25 0.04 2/execute as @e[tag=c9_r1] at @s run particle minecraft:dust{color:[1.0,0.1,0.1],scale:2.0} ^ ^ ^8 0.1 0.1 0.1 0 3/execute as @e[tag=c9_r2] at @s run particle minecraft:dust{color:[1.0,0.45,0.0],scale:2.0} ^ ^ ^9 0.1 0.1 0.1 0 3/execute as @e[tag=c9_r3] at @s run particle minecraft:dust{color:[1.0,0.95,0.1],scale:2.0} ^ ^ ^10 0.1 0.1 0.1 0 3/execute as @e[tag=c9_r4] at @s run particle minecraft:dust{color:[0.15,1.0,0.2],scale:2.0} ^ ^ ^11 0.1 0.1 0.1 0 3/execute as @e[tag=c9_r5] at @s run particle minecraft:dust{color:[0.0,0.9,1.0],scale:2.0} ^ ^ ^10 0.1 0.1 0.1 0 3/execute as @e[tag=c9_r6] at @s run particle minecraft:dust{color:[0.2,0.35,1.0],scale:2.0} ^ ^ ^9 0.1 0.1 0.1 0 3/execute as @e[tag=c9_r7] at @s run particle minecraft:dust{color:[0.8,0.15,1.0],scale:2.0} ^ ^ ^8 0.1 0.1 0.1 0 3setup #4 Summons an invisible armor stand carrier holding the three <code>cyan_stained_glass</code> sides of the triangular prism at 120-degree intervals, with full sky/block brightness and white glowing outlines.setup #5 Summons the three <code>sea_lantern</code> corner pillars of the prism so the spinning triangle has bright, clearly defined edges in the dark.setup #6 Creates the emitter lens, the incoming solid white laser beam stretching from the obsidian tower to the prism, and the first refracted red ray.setup #9 Dismounts all block displays from their carrier armor stands so they can rotate freely in place around the center of the prism.loop #3 Spins all six glass and sea lantern parts of the triangular prism by 3 degrees every tick using smooth teleport interpolation.loop #4 Sweeps the seven rainbow beam displays forward during the first 40 ticks of the cycle, while command 4 reverses them during ticks 40 to 79.


Recorded on our own test server: 56 frames at about 9.2 fps. Our image check saw: An obsidian tower shoots a white laser beam into a rotating glass prism over a pedestal, splitting the light into seven sweeping rainbow rays.
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_p]/kill @e[tag=c9_hub]/fill ~-14 ~0 ~-1 ~-13 ~4 ~1 minecraft:air/fill ~-1 ~0 ~-1 ~1 ~0 ~1 minecraft:air/scoreboard objectives remove c9timeSummoning multiple block displays as passengers on an invisible armor stand lets us group 3 complex entities into a single setup command while keeping total setup commands under 10, and dismounting them unlocks independent rotation.
Yes! Change the ~3 rotation value in the third loop command to spin the prism faster or slower, and adjust the ~1.2 and ~-1.2 values in the fourth and fifth loop commands to widen or narrow the rainbow sweep.
▶Sub-Zero Cryogenic Frost-Laser ObeliskLight Beams & LasersHard23 cmds
▶Floating Runic Magic Circle & Orbital BeamLight Beams & LasersHard24 cmds
▶Giant Newton's Prism Dispersion Cloud ChamberLight Beams & LasersMedium23 cmds
▶Iridescent Dragonfly Compound-Eye Laser MatrixLight Beams & LasersExpert26 cmds
▶Levitating Tarot Deck Arcana Light ProjectionLight Beams & LasersHard23 cmds
▶Prismatic Crookes Radiometer Solar Spin MillLight Beams & LasersMedium24 cmds