Planetary Defense Plasma Cannon

Build an automated sci-fi artillery cannon using display entities and particle rays that charges emerald energy and blasts a regenerating bunker.

Java EditionWands, Weapons & ToolsHard24 commandsTested on a real 26.2 & 26.3 server
A sci-fi plasma cannon charges green particles at its barrel while aiming at a distant target bunker. Download the GIF Video & GIF © www.9minecraft.net

Lasers & BeamsTechnologySpaceIndustrialGreenBlackWhiteCinematicMap MakingDecorationParticlesBlock displaysScoreboard timersExecute chainsSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

The Planetary Defense Plasma Cannon is an automated sci-fi artillery display built using display entities, dynamic particle vectors, and block manipulation. The heavy cannon base features an angled barrel with glowing emerald conduits and a spinning magnetic containment ring at the muzzle.

During each firing cycle, a target bunker regenerates downrange while green plasma gathers at the barrel tip. Once fully charged, the cannon fires a high-velocity energy beam across the stage that shatters the bunker on impact before resetting for the next shot.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /fill ~-3 ~ ~7 ~3 ~ ~13 minecraft:polished_deepslate
  3. /fill ~-2 ~1 ~8 ~2 ~2 ~12 minecraft:iron_block
  4. /fill ~-1 ~1 ~7 ~1 ~3 ~11 minecraft:obsidian
  5. /setblock ~-2 ~2 ~10 minecraft:emerald_block
  6. /setblock ~2 ~2 ~10 minecraft:emerald_block
  7. /setblock ~ ~3 ~10 minecraft:sea_lantern
  8. /summon minecraft:block_display ~ ~2.5 ~9 {Tags:["c9_ent","c9_barrel"],Rotation:[180f,-22f],transformation:{translation:[-0.6f,-0.6f,0f],scale:[1.2f,1.2f,7.5f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:polished_blackstone"}}
  9. /summon minecraft:block_display ~ ~2.5 ~9 {Tags:["c9_ent","c9_core"],Rotation:[180f,-22f],transformation:{translation:[-0.35f,-0.35f,0.5f],scale:[0.7f,0.7f,7.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:emerald_block"},brightness:{sky:15,block:15}}
  10. /summon minecraft:block_display ~ ~5.3 ~2.0 {Tags:["c9_ent","c9_muzzle"],Rotation:[180f,-22f],transformation:{translation:[-0.85f,-0.85f,-0.4f],scale:[1.7f,1.7f,0.8f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]},block_state:{Name:"minecraft:sea_lantern"},brightness:{sky:15,block:15}}

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

  1. /scoreboard players add #tick c9_timer 1
  2. /execute if score #tick c9_timer matches 140.. run scoreboard players set #tick c9_timer 1
  3. /execute as @e[tag=c9_muzzle] at @s run tp @s ~ ~ ~ ~12 ~
  4. /execute if score #tick c9_timer matches 1 run fill ~-2 ~ ~-12 ~2 ~6 ~-8 minecraft:quartz_bricks replace
  5. /execute if score #tick c9_timer matches 1 run fill ~-1 ~2 ~-12 ~1 ~4 ~-8 minecraft:tinted_glass
  6. /execute if score #tick c9_timer matches 1 run setblock ~ ~3 ~-10 minecraft:redstone_block
  7. /execute if score #tick c9_timer matches 20..80 run particle minecraft:dust{color:[0.1,1.0,0.2],scale:2.2} ~ ~5.3 ~2.0 1.5 1.5 1.5 0 15 force
  8. /execute if score #tick c9_timer matches 20..80 run particle minecraft:totem_of_undying ~ ~5.3 ~2.0 0.6 0.6 0.6 0.15 6 force
  9. /execute if score #tick c9_timer matches 80 run summon minecraft:marker ~ ~5.3 ~2.0 {Tags:["c9_ent","c9_ray"],Rotation:[180f,11f]}
  10. /execute as @e[tag=c9_ray] at @s run tp @s ^ ^ ^1.5
  11. /execute as @e[tag=c9_ray] at @s run particle minecraft:dust_color_transition{from_color:[0.2,1.0,0.3],to_color:[0.8,1.0,0.9],scale:3.5} ~ ~ ~ 0.25 0.25 0.25 0 25 force
  12. /execute as @e[tag=c9_ray] at @s if block ~ ~ ~ minecraft:redstone_block run particle minecraft:explosion_emitter ~ ~ ~ 1 1 1 0 3 force
  13. /execute as @e[tag=c9_ray] at @s if block ~ ~ ~ minecraft:redstone_block run fill ~-2 ~-2 ~-2 ~2 ~2 ~2 minecraft:air destroy
  14. /execute if score #tick c9_timer matches 95.. run kill @e[tag=c9_ray]

How it works

Frames from the test run

Planetary Defense Plasma Cannon - frame 1Planetary Defense Plasma Cannon - frame 2Planetary Defense Plasma Cannon - frame 3

Recorded on our own test server: 54 frames at about 8.9 fps. Our image check saw: An obsidian and iron cannon with emerald blocks charges green particles at its barrel tip while a grey target bunker appears in the background.

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 at least 35x35 blocks wide so both the cannon base and the target bunker have room to spawn.
  2. Run each of the 10 setup commands once in chat or inside impulse command blocks positioned at the center of your stage.
  3. Place 14 repeating command blocks (or 1 repeating block chained into 13 chain blocks) all set to Always Active.
  4. Paste the 14 loop commands into the repeating chain. Make sure they execute relative to the same center coordinate used for the setup.
  5. Watch the cannon charge up its emerald muzzle ring and fire a high-velocity plasma beam into the regenerating quartz bunker every 7 seconds.

Use it with real players

To fire the cannon manually instead of on an automatic loop, remove the first two timer commands and trigger the charge sequence when a player holds a custom controller item using /execute if entity @a[nbt={SelectedItem:{id:"minecraft:emerald"}}] run scoreboard players add #tick c9_timer 1. You can also aim the ray along the player's view angle by copying the player's rotation to the ray marker when it spawns.

Remove it again 4 commands

  1. /kill @e[tag=c9_ent]
  2. /kill @e[type=item]
  3. /fill ~-4 ~ ~-14 ~4 ~10 ~14 minecraft:air
  4. /scoreboard objectives remove c9_timer

FAQ

Why doesn't the plasma beam destroy the bunker if I move the command blocks?

Both the setup and loop commands use relative coordinates centered on the stage. Make sure all loop commands are executed from the exact same center position where you ran the setup commands.

Can I change the color of the plasma beam?

Yes! Edit the RGB float values inside the dust and dust_color_transition particle commands in the loop (for example, change [0.1,1.0,0.2] to [0.1,0.5,1.0] for a blue ion cannon).

Commands used

/execute/fill/kill/particle/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides