Autonomous Siege Battery

Build an automated pair of heavy artillery cannons that track moving target zones, launch glowing mortar shells in high arcs, and blast targets in Minecraft.

Java EditionWands, Weapons & ToolsMedium22 commandsTested on a real 26.2 & 26.3 server
Automated cannons launch glowing projectiles with fiery trails across a field toward a target ring. Download the GIF Video & GIF © www.9minecraft.net

Projectiles & MissilesTechnologyFireIndustrialOrangeRedYellowPvPMap MakingBoss FightBlock displaysItem displaysArmor standsBlock building (fill/setblock/clone)Rotation math21+ commands

This command creation sets up a pair of automated artillery cannons on one side of the field and a moving target zone on the other. Using display entities and scoreboard timers, the battery alternates fire between both cannons without any player input.

Each cannon produces a muzzle blast and launches a glowing mortar shell along a high parabolic arc, leaving a trail of smoke and flames before detonating in a large explosion with a fiery shockwave at the target site.

1. Setup - type these once 7 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-12 ~ ~-6 ~-8 ~ ~6 polished_blackstone_bricks
  3. /fill ~8 ~ ~-6 ~12 ~ ~6 deepslate_tiles
  4. /summon block_display ~-10 ~1 ~-3 {Tags:["c9_all","c9_gun","c9_g1"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:netherite_block"},transformation:{translation:[-0.5f,-0.2f,-0.5f],scale:[2.2f,0.9f,1.0f],left_rotation:[0f,0f,0.259f,0.966f],right_rotation:[0f,0f,0f,1f]}}
  5. /summon block_display ~-10 ~1 ~3 {Tags:["c9_all","c9_gun","c9_g2"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:netherite_block"},transformation:{translation:[-0.5f,-0.2f,-0.5f],scale:[2.2f,0.9f,1.0f],left_rotation:[0f,0f,0.259f,0.966f],right_rotation:[0f,0f,0f,1f]}}
  6. /summon armor_stand ~10 ~ ~-3 {Tags:["c9_all","c9_tgt"],NoGravity:1b,Invisible:1b,Marker:1b}
  7. /scoreboard players set #clock c9_t 0

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

  1. /scoreboard players add #clock c9_t 1
  2. /execute if score #clock c9_t matches 81.. run scoreboard players set #clock c9_t 1
  3. /execute at @e[tag=c9_tgt] run particle dust{color:[1.0,0.15,0.15],scale:2.5} ~ ~0.3 ~ 0.9 0.05 0.9 0 10 force
  4. /execute if score #clock c9_t matches 1 at @e[tag=c9_g1] run summon item_display ~1.4 ~1.2 ~ {Tags:["c9_all","c9_shell"],Glowing:1b,glow_color_override:16744192,item:{id:"minecraft:fire_charge",count:1},transformation:{translation:[0f,0f,0f],scale:[1.6f,1.6f,1.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  5. /execute if score #clock c9_t matches 41 at @e[tag=c9_g2] run summon item_display ~1.4 ~1.2 ~ {Tags:["c9_all","c9_shell"],Glowing:1b,glow_color_override:16744192,item:{id:"minecraft:fire_charge",count:1},transformation:{translation:[0f,0f,0f],scale:[1.6f,1.6f,1.6f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
  6. /execute if score #clock c9_t matches 1 at @e[tag=c9_g1] run particle lava ~1.5 ~1.3 ~ 0.2 0.2 0.2 0 12 force
  7. /execute if score #clock c9_t matches 41 at @e[tag=c9_g2] run particle lava ~1.5 ~1.3 ~ 0.2 0.2 0.2 0 12 force
  8. /execute if score #clock c9_t matches 20 run tp @e[tag=c9_tgt] ~10 ~ ~3
  9. /execute if score #clock c9_t matches 60 run tp @e[tag=c9_tgt] ~10 ~ ~-3
  10. /scoreboard players add @e[tag=c9_shell] c9_t 1
  11. /execute as @e[tag=c9_shell,scores={c9_t=1..20}] at @s facing entity @e[tag=c9_tgt,limit=1] feet run tp @s ^ ^0.45 ^0.52
  12. /execute as @e[tag=c9_shell,scores={c9_t=21..38}] at @s facing entity @e[tag=c9_tgt,limit=1] feet run tp @s ^ ^-0.40 ^0.55
  13. /execute at @e[tag=c9_shell] run particle flame ~ ~ ~ 0.1 0.1 0.1 0.02 5 force
  14. /execute at @e[tag=c9_shell,scores={c9_t=39..}] run particle explosion_emitter ~ ~ ~ 0 0 0 0 1 force
  15. /kill @e[tag=c9_shell,scores={c9_t=39..}]

How it works

Frames from the test run

Autonomous Siege Battery - frame 1Autonomous Siege Battery - frame 2Autonomous Siege Battery - frame 3

Recorded on our own test server: 51 frames at about 8.4 fps. Our image check saw: Two glowing cannon barrels on the left platform fire arcing trails of flame particles toward a glowing orange circle on the right platform.

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 41x41 clearing where you want the artillery range to appear.
  2. Run each of the 7 setup commands in chat to create the scoreboard objective, platforms, cannons, and target marker.
  3. Place a line of 15 command blocks nearby; set the first to Repeating and Always Active, and chain the remaining 14 to it as Chain, Unconditional, Always Active.
  4. Paste the 15 loop commands in order into the command blocks.
  5. Watch the two cannons alternate shots at the red target zone across the field.

Use it with real players

To have the artillery battery target real players instead of the automated marker, replace @e[tag=c9_tgt,limit=1] in the loop commands with @p[distance=..30] and remove the target teleport commands at loop indices 7 and 8.

Remove it again 4 commands

  1. /kill @e[tag=c9_all]
  2. /fill ~-12 ~ ~-6 ~-8 ~ ~6 air
  3. /fill ~8 ~ ~-6 ~12 ~ ~6 air
  4. /scoreboard objectives remove c9_t

FAQ

How do I change the firing speed of the cannons?

Lower the reset threshold in the second loop command from 81 to a smaller number, and adjust the firing ticks (1 and 41) accordingly.

Do the explosions damage surrounding blocks?

No, the blast uses the explosion_emitter particle effect rather than real TNT, so your builds and terrain stay intact.

Commands used

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

Similar creations

Join 9Minecraft News & Guides