Automated Sentinel Battery

Four swiveling dispenser turrets atop a beacon-lit deepslate bastion automatically track marching undead waves and fire glowing plasma bolts.

Java EditionWands, Weapons & ToolsMedium24 commandsTested on a real 26.2 & 26.3 server
Four glowing dispenser turrets around a beacon fire cyan plasma bolts at waves of approaching husks. Download the GIF Video & GIF © www.9minecraft.net

Projectiles & MissilesTechnologyDarkCyanBlackWhiteMini-gameAdventure MapMap MakingParticlesBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Glowing outlinesRotation math21+ commands

Four glowing dispenser turrets sit on a tiered deepslate and iron bastion around an active beacon core. As waves of husks march in from every angle, each turret smoothly swivels toward the nearest threat and launches cyan sea_lantern plasma bolts.

Every bolt streaks through the air with bright cyan dust trails, damages undead mobs on contact, and clears itself automatically so the battle runs smoothly on its own.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /fill ~-4 ~ ~-4 ~4 ~ ~4 minecraft:deepslate_bricks
  3. /fill ~-3 ~1 ~-3 ~3 ~1 ~3 minecraft:polished_deepslate
  4. /fill ~-1 ~2 ~-1 ~1 ~2 ~1 minecraft:iron_block
  5. /setblock ~ ~3 ~ minecraft:beacon
  6. /summon minecraft:iron_golem ~ ~3 ~ {Tags:["c9_bait"],Invulnerable:1b,NoAI:1b,Silent:1b,active_effects:[{id:"minecraft:invisibility",amplifier:0b,duration:-1,show_particles:0b}]}
  7. /summon minecraft:block_display ~1.2 ~3.4 ~1.2 {Tags:["c9_turret","c9_t1"],Glowing:1b,teleport_duration:2,block_state:{Name:"minecraft:dispenser",Properties:{facing:"south"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.85f,0.85f,0.85f],translation:[-0.425f,-0.425f,-0.425f]}}
  8. /summon minecraft:block_display ~-1.2 ~3.4 ~1.2 {Tags:["c9_turret","c9_t2"],Glowing:1b,teleport_duration:2,block_state:{Name:"minecraft:dispenser",Properties:{facing:"south"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.85f,0.85f,0.85f],translation:[-0.425f,-0.425f,-0.425f]}}
  9. /summon minecraft:block_display ~1.2 ~3.4 ~-1.2 {Tags:["c9_turret","c9_t3"],Glowing:1b,teleport_duration:2,block_state:{Name:"minecraft:dispenser",Properties:{facing:"south"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.85f,0.85f,0.85f],translation:[-0.425f,-0.425f,-0.425f]}}
  10. /summon minecraft:block_display ~-1.2 ~3.4 ~-1.2 {Tags:["c9_turret","c9_t4"],Glowing:1b,teleport_duration:2,block_state:{Name:"minecraft:dispenser",Properties:{facing:"south"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.85f,0.85f,0.85f],translation:[-0.425f,-0.425f,-0.425f]}}

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

  1. /scoreboard players add #g c9_tick 1
  2. /execute if score #g c9_tick matches 8.. run scoreboard players set #g c9_tick 0
  3. /execute as @e[tag=c9_bait] at @s run tp @s ~ ~ ~ ~37 0
  4. /execute store result score #mobs c9_tick if entity @e[tag=c9_mob]
  5. /execute if score #g c9_tick matches 0 if score #mobs c9_tick matches ..14 at @e[tag=c9_bait] run summon minecraft:husk ^ ^-3 ^16 {Tags:["c9_mob"],Glowing:1b}
  6. /execute as @e[tag=c9_turret] at @s if entity @e[tag=c9_mob,distance=..18] facing entity @e[tag=c9_mob,sort=nearest,limit=1] eyes run tp @s ~ ~ ~ ~ ~
  7. /execute if score #g c9_tick matches 0 as @e[tag=c9_turret] at @s if entity @e[tag=c9_mob,distance=..18] run summon minecraft:block_display ^ ^ ^0.6 {Tags:["c9_bolt"],Glowing:1b,teleport_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.22f,0.22f,0.85f],translation:[-0.11f,-0.11f,-0.425f]}}
  8. /execute as @e[tag=c9_bolt] unless score @s c9_tick matches 1.. at @s facing entity @e[tag=c9_mob,sort=nearest,limit=1] eyes run tp @s ~ ~ ~ ~ ~
  9. /scoreboard players add @e[tag=c9_bolt] c9_tick 1
  10. /execute as @e[tag=c9_bolt] at @s run tp @s ^ ^ ^1.1
  11. /execute as @e[tag=c9_bolt] at @s run particle minecraft:dust{color:[0.2,0.9,1.0],scale:1.1} ~ ~ ~ 0.05 0.05 0.05 0 2
  12. /execute as @e[tag=c9_bolt] at @s positioned ~ ~-1 ~ if entity @e[tag=c9_mob,distance=..1.3] run scoreboard players set @s c9_tick 99
  13. /execute as @e[tag=c9_bolt] if score @s c9_tick matches 99 at @s run damage @e[tag=c9_mob,sort=nearest,limit=1] 7
  14. /kill @e[tag=c9_bolt,scores={c9_tick=22..}]

How it works

Frames from the test run

Automated Sentinel Battery - frame 1Automated Sentinel Battery - frame 2Automated Sentinel Battery - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: Four glowing dispenser turrets on a tiered deepslate and iron platform around an active beacon rotate and fire glowing cyan projectiles with cyan particle trails at incoming glowing husks.

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. Clear a flat 41x41 area in your world and stand at the exact center on the block above the grass.
  2. Run each of the 10 setup commands once in order using chat or impulse command blocks.
  3. Place 14 repeating, always-active command blocks side by side near the edge of the area or in a loaded spawn chunk.
  4. Paste the 14 loop commands into the repeating command blocks in order so the turrets begin tracking and firing.
  5. Use the remove commands whenever you want to clear the battery, entities, and scoreboard.

Use it with real players

To use the Sentinel Battery to defend your own survival base instead of running a mob wave demo, leave out loop commands 3, 4, and 5 (index 2, 3, and 4) and replace tag=c9_mob with type=#minecraft:undead in the remaining loop commands so the turrets automatically target natural nighttime zombies, skeletons, and phantoms.

Remove it again 6 commands

  1. /kill @e[tag=c9_turret]
  2. /kill @e[tag=c9_bait]
  3. /kill @e[tag=c9_mob]
  4. /kill @e[tag=c9_bolt]
  5. /fill ~-4 ~ ~-4 ~4 ~3 ~4 minecraft:air
  6. /scoreboard objectives remove c9_tick

FAQ

Why do the husks keep marching straight toward the center?

An invisible, invulnerable iron golem tagged <code>c9_bait</code> sits inside the beacon block at the center, drawing every undead mob toward the bastion walls.

Can I change how fast the turrets fire or how much damage each bolt deals?

Yes. Lower the reset value in loop command 2 (for example, from 8 to 5) to increase fire rate, or change the <code>7</code> at the end of loop command 13 to adjust bolt damage.

Commands used

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

Similar creations

Join 9Minecraft News & Guides