Build an automated Iron-Dome style defense turret in vanilla Minecraft that tracks falling TNT and arrows, shooting them down mid-air with cyan laser missiles.
Projectiles & MissilesTechnologyIndustrialFireCyanOrangeRedMap MakingPvPMini-gameBlock displaysArmor standsSummoned mobsBlock building (fill/setblock/clone)Rotation math13-20 commands
The Skyshield Intercept Battery turns a simple pedestal into an active air-defense system. In this demonstration, flaming arrows and glowing TNT blocks rain down from the night sky toward the center platform. Before any threat can strike the ground, the turret swivels toward the closest hazard and launches high-speed glowing cyan interceptors that curve into the target and detonate it safely overhead.
Everything runs entirely on vanilla command blocks using entity rotation math, block displays, and vibrant particle trails to simulate real-time radar tracking and mid-air explosions.
/scoreboard objectives add c9_t dummy/fill ~-2 ~ ~-2 ~2 ~ ~2 iron_block/fill ~-1 ~1 ~-1 ~1 ~1 ~1 smooth_stone_slab/setblock ~ ~1 ~ sea_lantern/summon armor_stand ~ ~1.6 ~ {NoGravity:1b,Invisible:1b,Small:1b,Tags:["c9_all","c9_turret"],ArmorItems:[{},{},{},{id:"minecraft:dispenser",count:1}]}/summon block_display ~-0.35 ~2.2 ~-0.35 {Tags:["c9_all","c9_dome"],block_state:{Name:"minecraft:beacon"},transformation:{scale:[0.7f,0.7f,0.7f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/scoreboard players add #tick c9_t 1/execute if score #tick c9_t matches 15.. run scoreboard players set #tick c9_t 0/execute if score #tick c9_t matches 1 run summon tnt ~ ~17 ~ {fuse:200s,Glowing:1b,Tags:["c9_all","c9_threat","c9_new"]}/execute if score #tick c9_t matches 8 run summon arrow ~ ~17 ~ {Fire:200s,Glowing:1b,Tags:["c9_all","c9_threat","c9_new"]}/execute as @e[tag=c9_new] at @s run spreadplayers ~ ~ 3 11 false @s/tag @e[tag=c9_new] remove c9_new/execute as @e[tag=c9_turret] at @s facing entity @e[tag=c9_threat,sort=nearest,limit=1] eyes run tp @s ~ ~ ~ ~ ~/execute if score #tick c9_t matches 4 as @e[tag=c9_turret] at @s if entity @e[tag=c9_threat,distance=..25] run summon armor_stand ~ ~0.6 ~ {NoGravity:1b,Invisible:1b,Marker:1b,Tags:["c9_all","c9_int"]}/execute if score #tick c9_t matches 11 as @e[tag=c9_turret] at @s if entity @e[tag=c9_threat,distance=..25] run summon armor_stand ~ ~0.6 ~ {NoGravity:1b,Invisible:1b,Marker:1b,Tags:["c9_all","c9_int"]}/execute as @e[tag=c9_int] at @s facing entity @e[tag=c9_threat,sort=nearest,limit=1] eyes run tp @s ^ ^ ^1.1 ~ ~/execute at @e[tag=c9_int] run particle dust{color:[0.0,1.0,1.0],scale:1.5} ~ ~ ~ 0.05 0.05 0.05 0 4 force/execute at @e[tag=c9_threat] run particle flame ~ ~0.3 ~ 0.1 0.1 0.1 0.02 2 force/execute as @e[tag=c9_int] at @s if entity @e[tag=c9_threat,distance=..1.8] run particle explosion_emitter ~ ~ ~ 0 0 0 0 1 force/execute as @e[tag=c9_int] at @s if entity @e[tag=c9_threat,distance=..1.8] run kill @e[tag=c9_all,distance=..2.2]loop #3 Every 15 ticks, the system spawns a glowing TNT block with a long 200-tick fuse high above the stage, tagging it with <code>c9_new</code> so the next command can scatter it randomly across the sky.loop #5 Uses <code>/spreadplayers</code> on newly spawned projectiles to scatter them randomly between 3 and 11 blocks away from the center while keeping their altitude intact.loop #7 Rotates the turret armor stand every tick so that its head always faces the nearest incoming threat in the sky.loop #10 Steers each active interceptor marker toward the closest falling threat and advances it forward 1.1 blocks per tick using local caret coordinates (<code>^ ^ ^1.1</code>).loop #14 When an interceptor gets within 1.8 blocks of a threat, it triggers an explosion particle in the previous command and removes both the interceptor and the threat mid-air.


Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A central beacon pedestal emits curving trails of cyan particles into the night sky alongside explosion smoke, fire particles, and a glowing TNT block.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To use the Skyshield Battery as a real survival base defense against player-shot arrows, ghast fireballs, or TNT cannons, remove loop commands 3, 4, 5, and 6 (which spawn the demo barrage). Then replace tag=c9_threat in the remaining loop commands with type=#minecraft:impact_projectiles or type=tnt so the turret automatically locks onto real incoming threats.
/kill @e[tag=c9_all]/fill ~-2 ~ ~-2 ~2 ~2 ~2 air/scoreboard objectives remove c9_tNo. In the demo, the TNT spawns with a 200-tick (10-second) fuse, giving the high-speed interceptors plenty of time to destroy every block long before it reaches the ground or detonates.
Yes. Increase the caret distance in loop command 10 from ^ ^ ^1.1 to ^ ^ ^1.5 for faster missiles, or lower the cycle reset in loop command 2 from 15.. to 10.. for a heavier barrage and faster fire rate.
/execute/fill/kill/particle/scoreboard/setblock/spreadplayers/summon/tag/tp
▶Magnetic Rail-Track Javelin AssemblerProjectiles & MissilesExpert22 cmds
▶Steampunk Piston-Hammer Pilebunker GauntletProjectiles & MissilesMedium24 cmds
▶16-Way Automated ArtilleryProjectiles & MissilesHard25 cmds
▶Heat-Seeking Rocket LauncherProjectiles & MissilesMedium19 cmds
▶Homing Missile AirstrikeProjectiles & MissilesHard22 cmds
▶Automated Homing Missile SentryProjectiles & MissilesHard21 cmds