Tactical Cover Sentries

Two armored crossbow sentries patrol a courtyard in formation, then break ranks to sprint behind deepslate barricades and crouch when a laser turret fires.

Java EditionMobs & PetsHard26 commandsTested on a real 26.2 & 26.3 server
Two armored sentries take cover behind deepslate barricades as a turret fires a flame beam. Download the GIF Video & GIF © www.9minecraft.net

Custom MobsTechnologyFireMedievalRedOrangeBlackMap MakingAdventure MapCinematicArmor standsBlock building (fill/setblock/clone)Rotation math21+ commands

Watch two armored crossbow sentries patrol a stone courtyard in a synchronized circle. When the downrange dispenser turret begins charging with bright red sparks, both sentries immediately break formation, sprint toward the nearest waist-high deepslate barricade, and shrink down to crouch in cover while fiery laser bolts slam into the walls in front of them.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-9 ~-1 ~-8 ~9 ~-1 ~6 polished_andesite
  3. /fill ~-6 ~ ~-2 ~-2 ~ ~-2 deepslate_tile_wall
  4. /fill ~2 ~ ~-2 ~6 ~ ~-2 deepslate_tile_wall
  5. /setblock ~ ~ ~-7 dispenser[facing=south]
  6. /setblock ~ ~1 ~-7 redstone_lamp[lit=true]
  7. /summon armor_stand ~ ~ ~2 {Tags:["c9_ctrl"],Invisible:1b,NoGravity:1b,Marker:1b}
  8. /summon armor_stand ~-4 ~ ~-0.7 {Tags:["c9_cover","c9_c1"],Invisible:1b,NoGravity:1b,Marker:1b}
  9. /summon armor_stand ~4 ~ ~-0.7 {Tags:["c9_cover","c9_c2"],Invisible:1b,NoGravity:1b,Marker:1b}
  10. /summon armor_stand ~-2.5 ~ ~2 {Tags:["c9_sentry","c9_s1"],NoGravity:1b,ShowArms:1b,Glowing:1b,CustomName:'{"text":"Sentry Alpha","color":"aqua"}',CustomNameVisible:1b,equipment:{head:{id:"minecraft:netherite_helmet",count:1},chest:{id:"minecraft:iron_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:netherite_boots",count:1},mainhand:{id:"minecraft:crossbow",count:1}},Pose:{RightArm:[-30f,-20f,0f],LeftArm:[-30f,30f,0f]}}

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

  1. /execute unless entity @e[tag=c9_s2] run summon armor_stand ~2.5 ~ ~2 {Tags:["c9_sentry","c9_s2"],NoGravity:1b,ShowArms:1b,Glowing:1b,CustomName:'{"text":"Sentry Bravo","color":"aqua"}',CustomNameVisible:1b,equipment:{head:{id:"minecraft:netherite_helmet",count:1},chest:{id:"minecraft:iron_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:netherite_boots",count:1},mainhand:{id:"minecraft:crossbow",count:1}},Pose:{RightArm:[-30f,-20f,0f],LeftArm:[-30f,30f,0f]}}
  2. /scoreboard players add @e[tag=c9_ctrl] c9_t 1
  3. /execute if entity @e[tag=c9_ctrl,scores={c9_t=100..}] run scoreboard players set @e[tag=c9_ctrl] c9_t 0
  4. /execute if entity @e[tag=c9_ctrl,scores={c9_t=1..44}] as @e[tag=c9_sentry] run attribute @s minecraft:scale base set 1.0
  5. /execute if entity @e[tag=c9_ctrl,scores={c9_t=1..44}] as @e[tag=c9_sentry] at @s unless entity @e[tag=c9_ctrl,distance=..2.3] facing entity @e[tag=c9_ctrl,limit=1] feet run tp @s ^ ^ ^0.22 ~ ~
  6. /execute if entity @e[tag=c9_ctrl,scores={c9_t=1..44}] as @e[tag=c9_sentry] at @s if entity @e[tag=c9_ctrl,distance=..2.3] facing entity @e[tag=c9_ctrl,limit=1] feet rotated ~-86 0 run tp @s ^ ^ ^0.16 ~ ~
  7. /execute if entity @e[tag=c9_ctrl,scores={c9_t=45..99}] as @e[tag=c9_sentry] at @s unless entity @e[tag=c9_cover,distance=..0.7] facing entity @e[tag=c9_cover,sort=nearest,limit=1] feet run tp @s ^ ^ ^0.38 ~ ~
  8. /execute if entity @e[tag=c9_ctrl,scores={c9_t=45..99}] as @e[tag=c9_sentry] at @s if entity @e[tag=c9_cover,distance=..0.7] facing ~ ~ ~-7 run tp @s ~ ~ ~ ~ 0
  9. /execute if entity @e[tag=c9_ctrl,scores={c9_t=45..99}] as @e[tag=c9_sentry] at @s if entity @e[tag=c9_cover,distance=..0.7] run attribute @s minecraft:scale base set 0.58
  10. /execute if entity @e[tag=c9_ctrl,scores={c9_t=45..99}] run particle dust{color:[1.0,0.1,0.0],scale:2.2} ~ ~0.6 ~-5.9 0.35 0.35 0.35 0 10
  11. /execute if entity @e[tag=c9_ctrl,scores={c9_t=62..92}] unless entity @e[tag=c9_bolt] run summon armor_stand ~ ~0.6 ~-5.8 {Tags:["c9_bolt"],Invisible:1b,NoGravity:1b,Marker:1b}
  12. /execute as @e[tag=c9_bolt] at @s positioned ~ ~ ~-5.8 if entity @s[distance=..0.5] facing entity @e[tag=c9_cover,sort=random,limit=1] feet run tp @s ~ ~ ~ ~ ~
  13. /execute as @e[tag=c9_bolt] at @s run tp @s ^ ^ ^0.85
  14. /execute as @e[tag=c9_bolt] at @s run particle flame ~ ~ ~ 0.08 0.08 0.08 0.02 8
  15. /execute as @e[tag=c9_bolt] at @s unless block ~ ~ ~ air run particle lava ~ ~0.3 ~ 0.2 0.2 0.2 0 12
  16. /execute as @e[tag=c9_bolt] at @s unless block ~ ~ ~ air run kill @s

How it works

Frames from the test run

Tactical Cover Sentries - frame 1Tactical Cover Sentries - frame 2Tactical Cover Sentries - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: Two armored pillager sentries patrol a stone platform, then run behind two deepslate walls and shrink down to take cover as a red-glowing turret shoots fire down the middle.

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 and run each of the 10 setup commands in chat to build the courtyard, deepslate barricades, turret, and first sentry.
  2. Place 14 repeating command blocks in a cluster near the stage, set every block to Always Active, and paste one loop command into each block.
  3. Notice that the original 16 loop lines can be shortened to 14 by combining the bolt hit particle and cleanup or keeping the 14 main loop blocks.
  4. Watch the two sentries patrol the center courtyard during the first two seconds of the cycle.
  5. When the red dust particles flare at the turret, watch both sentries break formation, sprint behind the walls, and duck as fiery bolts hit the stone.

Use it with real players

To make the sentries react to a real player aiming at them instead of a timed turret, replace the c9_ctrl timer checks (scores={c9_t=45..99}) with if entity @a[nbt={SelectedItem:{id:"minecraft:crossbow"}}] so the guards immediately sprint to cover whenever a player draws a crossbow.

Remove it again 7 commands

  1. /kill @e[tag=c9_sentry]
  2. /kill @e[tag=c9_ctrl]
  3. /kill @e[tag=c9_cover]
  4. /kill @e[tag=c9_bolt]
  5. /scoreboard objectives remove c9_t
  6. /fill ~-9 ~-1 ~-8 ~9 ~1 ~6 air
  7. /fill ~-9 ~-1 ~-8 ~9 ~-1 ~6 grass_block

FAQ

How do the armor stands crouch behind the wall?

The loop lowers their minecraft:scale attribute from 1.0 down to 0.58 as soon as they arrive within 0.7 blocks of the cover marker, making them drop below the deepslate wall height.

Can I add more barricades and sentries?

Yes. Summon additional armor stands with the c9_sentry tag and extra cover markers with the c9_cover tag behind new walls; each sentry automatically runs to the nearest cover marker.

Commands used

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

Similar creations

Join 9Minecraft News & Guides