Sci-Fi Mega Cannon Firing Sequence

Build an automated sci-fi railgun turret in vanilla Minecraft using block displays, smooth recoil animations, swirling energy particles, and a massive plasma blast.

Java EditionWands, Weapons & ToolsHard24 commandsTested on a real 26.2 & 26.3 server
A sci-fi turret charges with colorful particles and fires a cyan laser beam with shockwave rings. Download the GIF Video & GIF © www.9minecraft.net

Lasers & BeamsTechnologySpaceCyanWhitePurpleCinematicMap MakingPvPBlock displaysArmor standsSmooth animation (interpolation)Block building (fill/setblock/clone)21+ commands

This command creation assembles a futuristic sci-fi turret out of block display entities and runs an automated firing sequence against a target dummy across the stage. During the charge phase, swirling cyan and magenta energy particles draw into the glowing core while a beacon-style laser locks onto the target.

When the capacitor reaches maximum charge, the barrel slams backward with smooth display interpolation and unleashes a high-velocity plasma beam that detonates on the target with shockwave rings and flying sparks.

1. Setup - type these once 9 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /fill ~-2 ~-1 ~-9 ~2 ~-1 ~-5 polished_deepslate
  3. /setblock ~ ~-1 ~-7 sea_lantern
  4. /summon block_display ~ ~ ~-7 {Tags:["c9_all","c9_turret"],brightness:{sky:15,block:15},transformation:{translation:[-1.0f,0.0f,-1.0f],scale:[2.0f,1.2f,2.0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:iron_block"}}
  5. /summon block_display ~ ~1.2 ~-7 {Tags:["c9_all","c9_barrel"],interpolation_duration:4,brightness:{sky:15,block:15},transformation:{translation:[-0.6f,0.0f,-1.5f],scale:[1.2f,1.0f,3.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:netherite_block"}}
  6. /summon block_display ~ ~1.35 ~-7 {Tags:["c9_all","c9_core"],interpolation_duration:4,brightness:{sky:15,block:15},transformation:{translation:[-0.35f,0.0f,-1.0f],scale:[0.7f,0.7f,4.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:sea_lantern"}}
  7. /summon block_display ~ ~1.7 ~-5 {Tags:["c9_all","c9_beam"],interpolation_duration:2,brightness:{sky:15,block:15},transformation:{translation:[-0.05f,-0.05f,0.0f],scale:[0.1f,0.1f,0.1f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:beacon"}}
  8. /summon armor_stand ~ ~ ~9 {Tags:["c9_all","c9_target"],NoGravity:1b,Invisible:1b,ArmorItems:[{id:"minecraft:netherite_boots",count:1},{id:"minecraft:netherite_leggings",count:1},{id:"minecraft:netherite_chestplate",count:1},{id:"minecraft:sea_lantern",count:1}]}
  9. /scoreboard players set #tick c9_timer 0

2. Loop - one repeating command block each (Always Active) 15 commands

  1. /scoreboard players add #tick c9_timer 1
  2. /execute if score #tick c9_timer matches 100.. run scoreboard players set #tick c9_timer 0
  3. /execute if score #tick c9_timer matches 1..40 run particle dust_color_transition{from_color:[0.0,0.8,1.0],to_color:[1.0,0.0,1.0],scale:1.6} ~ ~1.7 ~-4.5 1.2 1.2 1.2 0 12 force
  4. /execute if score #tick c9_timer matches 20..58 run particle electric_spark ~ ~1.7 ~-4.5 0.4 0.4 0.4 0.8 15 force
  5. /execute if score #tick c9_timer matches 35..58 run particle sculk_charge_pop ~ ~1.7 ~-4.5 0.2 0.2 0.2 0.05 10 force
  6. /execute if score #tick c9_timer matches 35 as @e[tag=c9_core] run data merge entity @s {start_interpolation:0,interpolation_duration:20,transformation:{translation:[-0.45f,-0.1f,-1.0f],scale:[0.9f,0.9f,4.4f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  7. /execute if score #tick c9_timer matches 55 as @e[tag=c9_beam] run data merge entity @s {start_interpolation:0,interpolation_duration:2,transformation:{translation:[-0.08f,-0.08f,0.0f],scale:[0.16f,0.16f,14.0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  8. /execute if score #tick c9_timer matches 60 as @e[tag=c9_barrel] run data merge entity @s {start_interpolation:0,interpolation_duration:2,transformation:{translation:[-0.6f,0.0f,-2.7f],scale:[1.2f,1.0f,3.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  9. /execute if score #tick c9_timer matches 60 as @e[tag=c9_core] run data merge entity @s {start_interpolation:0,interpolation_duration:2,transformation:{translation:[-0.55f,-0.2f,-2.2f],scale:[1.1f,1.1f,4.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  10. /execute if score #tick c9_timer matches 60 as @e[tag=c9_beam] run data merge entity @s {start_interpolation:0,interpolation_duration:2,transformation:{translation:[-0.45f,-0.45f,0.0f],scale:[0.9f,0.9f,14.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  11. /execute if score #tick c9_timer matches 60..66 run particle sonic_boom ~ ~1.7 ~-3 0 0 3.5 1 5 force
  12. /execute if score #tick c9_timer matches 60..68 run particle end_rod ~ ~1.5 ~9 0.6 0.6 0.6 0.6 40 force
  13. /execute if score #tick c9_timer matches 61 run particle explosion_emitter ~ ~1.5 ~9 0 0 0 0 1 force
  14. /execute if score #tick c9_timer matches 75 as @e[tag=c9_barrel] run data merge entity @s {start_interpolation:0,interpolation_duration:18,transformation:{translation:[-0.6f,0.0f,-1.5f],scale:[1.2f,1.0f,3.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  15. /execute if score #tick c9_timer matches 75 as @e[tag=c9_beam] run data merge entity @s {start_interpolation:0,interpolation_duration:8,transformation:{translation:[-0.05f,-0.05f,0.0f],scale:[0.1f,0.1f,0.1f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}

How it works

Frames from the test run

Sci-Fi Mega Cannon Firing Sequence - frame 1Sci-Fi Mega Cannon Firing Sequence - frame 2Sci-Fi Mega Cannon Firing Sequence - frame 3

Recorded on our own test server: 50 frames at about 9.8 fps. Our image check saw: A futuristic white and cyan turret charges up with swirling blue and purple particles before firing a glowing cyan laser beam surrounded by sonic boom rings.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Stand at the center of a flat open area facing South (+Z) and run each command in the Setup list once in chat.
  2. Place a line of 15 Repeating Command Blocks set to Always Active near your stage.
  3. Paste one command from the Loop list into each repeating command block.
  4. Make sure all repeating command blocks execute relative to the exact center coordinates where you ran the setup commands.
  5. Watch the cannon charge up and fire every 5 seconds automatically.

Use it with real players

To let a player trigger the cannon on demand instead of firing on an automatic loop, remove the first two loop commands and only increment #tick c9_timer when a player holds or clicks a custom controller item or presses a button connected to an impulse command block that sets #tick c9_timer to 1.

Remove it again 3 commands

  1. /kill @e[tag=c9_all]
  2. /fill ~-2 ~-1 ~-9 ~2 ~-1 ~-5 grass_block
  3. /scoreboard objectives remove c9_timer

FAQ

Why does the plasma beam animate so smoothly without summoning extra entities?

It uses a single block_display entity with start_interpolation and interpolation_duration, which tells the Minecraft client to smoothly animate scale and position changes between ticks.

Can I change the firing speed of the turret?

Yes! Lower or raise the reset threshold in the second loop command (currently 100 ticks, or 5 seconds) to make the cannon fire faster or slower.

Commands used

/data/execute/fill/particle/scoreboard/setblock/summon

Similar creations

Join 9Minecraft News & Guides