An automated artillery turret swivels toward orbiting targets and fires calibrated, glowing TNT volleys along high parabolic arcs with fiery explosions.
Projectiles & MissilesTechnologyFireOrangeRedWhiteMini-gamePvPMap MakingBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands
Place a self-aiming artillery cannon in the centre of your arena and watch it lock onto glowing bullseye targets orbiting around it. Every 1.6 seconds, the amber-outlined barrel swivels smoothly toward the nearest target and lobs a blazing primed TNT shell high into the air.
Each shot is mathematically calibrated to the target's live coordinates so the arcing explosive lands right on mark, erupting in an explosion burst while the target redeploys across the field.
/scoreboard objectives add c9_t dummy/fill ~-1 ~ ~-1 ~1 ~ ~1 minecraft:polished_deepslate/setblock ~ ~1 ~ minecraft:chiseled_deepslate/summon minecraft:block_display ~ ~2.0 ~ {Tags:["c9_turret","c9_part"],block_state:{Name:"minecraft:oxidized_copper"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.55f,0.0f,-0.55f],scale:[1.1f,0.7f,1.1f]}}/summon minecraft:block_display ~ ~2.35 ~ {Tags:["c9_barrel","c9_part"],teleport_duration:3,Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:netherite_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.22f,-0.22f,0.0f],scale:[0.44f,0.44f,2.3f]}}/execute store result score #cx c9_t run data get entity @e[tag=c9_turret,limit=1] Pos[0] 1000/execute store result score #cz c9_t run data get entity @e[tag=c9_turret,limit=1] Pos[2] 1000/summon minecraft:block_display ~9 ~2.0 ~5 {Tags:["c9_target","c9_part"],Glowing:1b,glow_color_override:16733525,block_state:{Name:"minecraft:target"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.6f,-0.6f,-0.6f],scale:[1.2f,1.2f,1.2f]}}/summon minecraft:block_display ~-11 ~2.0 ~4 {Tags:["c9_target","c9_part"],Glowing:1b,glow_color_override:16733525,block_state:{Name:"minecraft:target"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.6f,-0.6f,-0.6f],scale:[1.2f,1.2f,1.2f]}}/summon minecraft:block_display ~2 ~2.0 ~-13 {Tags:["c9_target","c9_part"],Glowing:1b,glow_color_override:16733525,block_state:{Name:"minecraft:target"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.6f,-0.6f,-0.6f],scale:[1.2f,1.2f,1.2f]}}/scoreboard players add #t c9_t 1/execute if score #t c9_t matches 32.. run scoreboard players set #t c9_t 0/execute as @e[tag=c9_target] at @s facing entity @e[tag=c9_turret,limit=1] feet run tp @s ^0.04 ^ ^0.0004 ~ 0/execute positioned ~ ~2.35 ~ as @e[tag=c9_barrel] facing entity @e[tag=c9_target,sort=nearest,limit=1] feet run tp @s ~ ~ ~ ~ -35/execute if score #t c9_t matches 0 at @e[tag=c9_barrel,limit=1] run summon minecraft:tnt ^ ^ ^2.2 {fuse:100s,Glowing:1b,Motion:[0.0,0.50,0.0],Tags:["c9_shell","c9_part"]}/execute if score #t c9_t matches 0 store result score #dx c9_t run data get entity @e[tag=c9_target,sort=nearest,limit=1] Pos[0] 1000/execute if score #t c9_t matches 0 store result entity @e[tag=c9_shell,sort=nearest,limit=1] Motion[0] double 0.0000394 run scoreboard players operation #dx c9_t -= #cx c9_t/execute if score #t c9_t matches 0 store result score #dz c9_t run data get entity @e[tag=c9_target,sort=nearest,limit=1] Pos[2] 1000/execute if score #t c9_t matches 0 store result entity @e[tag=c9_shell,sort=nearest,limit=1] Motion[2] double 0.0000394 run scoreboard players operation #dz c9_t -= #cz c9_t/execute at @e[tag=c9_shell] run particle minecraft:flame ~ ~0.3 ~ 0.1 0.1 0.1 0.02 3/execute as @e[tag=c9_shell] at @s unless block ~ ~-0.8 ~ minecraft:air run tag @s add c9_boom/execute as @e[tag=c9_target] at @s if entity @e[tag=c9_boom,distance=..3.5] facing entity @e[tag=c9_turret,limit=1] feet run tp @s ^3 ^ ^22/execute at @e[tag=c9_boom] run particle minecraft:explosion_emitter ~ ~0.6 ~ 0.4 0.4 0.4 0 2/kill @e[tag=c9_boom]setup #5 Summons the netherite cannon barrel as a <code>block_display</code> with <code>teleport_duration:3</code> so its rotation smoothly glides whenever it switches between targets.setup #6 Saves the turret's world X coordinate (multiplied by 1000 for millimetre precision) into <code>#cx</code> so the loop can compute exact horizontal distances to any target.loop #3 Faces each target toward the central turret and nudges it sideways by <code>0.04</code> blocks per tick, creating a smooth circular orbit around the cannon.loop #4 Aims the cannon barrel horizontally toward the nearest target while locking its upward pitch at <code>-35</code> degrees for an artillery elevation.loop #7 Subtracts the cannon's X position from the target's X position and scales the difference by <code>0.0000394</code> into the TNT shell's <code>Motion[0]</code>, calibrating the parabolic arc to land on target.loop #11 Tags any flying shell with <code>c9_boom</code> right as it reaches ground level so it triggers a safe particle explosion instead of detonating blocks.loop #12 Any target caught within <code>3.5</code> blocks of a blast teleports 22 blocks straight across the centre to redeploy on the far side of the arena.


Recorded on our own test server: 55 frames at about 9.1 fps. Our image check saw: A central turret with an orange-outlined barrel swivels and fires flaming TNT blocks in an arc at floating, glowing target blocks that explode upon impact.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To turn the cannon into a real base defense for players, replace tag=c9_target in the aiming and targeting commands with a hostile mob selector such as type=minecraft:zombie,distance=..18 and add a /damage command at @e[tag=c9_boom] instead of teleporting targets.
/kill @e[tag=c9_part]/fill ~-1 ~ ~-1 ~1 ~1 ~1 minecraft:air/scoreboard objectives remove c9_tNo. Each shell is summoned with a 5-second fuse and is tagged and removed the instant it reaches ground level, replacing the real detonation with an <code>explosion_emitter</code> particle burst.
Every time a shell spawns, the loop measures the X and Z distance from the turret to the nearest target and scales the shell's initial <code>Motion</code> vector to match a ~30-tick parabolic arc.
/data/execute/fill/kill/particle/scoreboard/setblock/summon/tag/tp
▶Magnetic Rail-Track Javelin AssemblerProjectiles & MissilesExpert22 cmds
▶Pachinko-Board Trick-Shot CrossbowProjectiles & MissilesExpert24 cmds
▶Steampunk Piston-Hammer Pilebunker GauntletProjectiles & MissilesMedium24 cmds
▶16-Way Automated ArtilleryProjectiles & MissilesHard25 cmds
▶Artillery Projectile SimulatorProjectiles & MissilesHard24 cmds
▶Automated Airstrike BombardmentProjectiles & MissilesMedium22 cmds