Autonomous Siege Gauntlet

Three glowing elemental turrets track invaders marching along a dark stone track, firing homing fire, frost, and arcane orbs to guard a beacon core.

Java EditionComplex Contraptions & CinematicsExpert24 commandsTested on a real 26.2 & 26.3 server
Glowing mobs follow a winding path toward a magenta beacon while floating elemental blocks fire projectiles at them. Download the GIF Video & GIF © www.9minecraft.net

SimulationsMysticEndDarkPurpleBlackOrangeMini-gameAdventure MapMap MakingBlock displaysItem displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

Armored husks march automatically along a winding stone and purpur gauntlet while three levitating elemental sentries lock on and bombard them with homing projectiles. A magenta beacon marks the core at the center of the arena.

Everything runs on command blocks with zero player input, using block-guided pathfinding and smooth block_display rotation so the siege plays out continuously on its own.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9t dummy
  2. /fill ~-15 ~-1 ~-11 ~12 ~-1 ~-9 minecraft:deepslate_tiles
  3. /fill ~10 ~-1 ~-11 ~12 ~-1 ~1 minecraft:cracked_deepslate_tiles
  4. /fill ~1 ~-1 ~-1 ~12 ~-1 ~1 minecraft:purpur_block
  5. /fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:iron_block
  6. /setblock ~ ~ ~ minecraft:beacon
  7. /setblock ~ ~1 ~ minecraft:magenta_stained_glass
  8. /summon minecraft:block_display ~-6 ~1.5 ~-4 {Tags:["c9_turret","c9_fire"],Glowing:1b,teleport_duration:2,block_state:{Name:"minecraft:magma_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.5f,-0.5f,-0.5f],scale:[1f,1f,1f]}}
  9. /summon minecraft:block_display ~6 ~1.5 ~-4 {Tags:["c9_turret","c9_frost"],Glowing:1b,teleport_duration:2,block_state:{Name:"minecraft:blue_ice"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.5f,-0.5f,-0.5f],scale:[1f,1f,1f]}}
  10. /summon minecraft:block_display ~ ~1.5 ~5 {Tags:["c9_turret","c9_arc"],Glowing:1b,teleport_duration:2,block_state:{Name:"minecraft:amethyst_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.5f,-0.5f,-0.5f],scale:[1f,1f,1f]}}

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

  1. /scoreboard players add #tick c9t 1
  2. /execute if score #tick c9t matches 20.. run scoreboard players set #tick c9t 0
  3. /execute if score #tick c9t matches 1 positioned ~-14 ~ ~-10 unless entity @e[tag=c9_mob,distance=..2] run summon minecraft:husk ~ ~ ~ {Tags:["c9_mob"],NoAI:1b,Glowing:1b,Silent:1b,equipment:{head:{id:"minecraft:iron_helmet",count:1},chest:{id:"minecraft:chainmail_chestplate",count:1}}}
  4. /execute as @e[tag=c9_mob] at @s if block ~ ~-1 ~ minecraft:deepslate_tiles run tp @s ~0.22 ~ ~ -90 0
  5. /execute as @e[tag=c9_mob] at @s if block ~ ~-1 ~ minecraft:cracked_deepslate_tiles run tp @s ~ ~ ~0.22 0 0
  6. /execute as @e[tag=c9_mob] at @s if block ~ ~-1 ~ minecraft:purpur_block run tp @s ~-0.22 ~ ~ 90 0
  7. /kill @e[tag=c9_mob,distance=..2.6]
  8. /execute as @e[tag=c9_turret] at @s facing entity @e[tag=c9_mob,limit=1,sort=nearest,distance=..13] eyes run tp @s ~ ~ ~ ~ ~
  9. /execute if score #tick c9t matches 4 as @e[tag=c9_fire] at @s if entity @e[tag=c9_mob,distance=..13] run summon minecraft:item_display ~ ~ ~ {Tags:["c9_orb"],Glowing:1b,billboard:"center",teleport_duration:1,item:{id:"minecraft:fire_charge",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.7f,0.7f,0.7f]}}
  10. /execute if score #tick c9t matches 10 as @e[tag=c9_frost] at @s if entity @e[tag=c9_mob,distance=..13] run summon minecraft:item_display ~ ~ ~ {Tags:["c9_orb"],Glowing:1b,billboard:"center",teleport_duration:1,item:{id:"minecraft:blue_ice",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.6f,0.6f,0.6f]}}
  11. /execute if score #tick c9t matches 16 as @e[tag=c9_arc] at @s if entity @e[tag=c9_mob,distance=..13] run summon minecraft:item_display ~ ~ ~ {Tags:["c9_orb"],Glowing:1b,billboard:"center",teleport_duration:1,item:{id:"minecraft:ender_pearl",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.7f,0.7f,0.7f]}}
  12. /execute as @e[tag=c9_orb] at @s facing entity @e[tag=c9_mob,limit=1,sort=nearest,distance=..32] eyes run tp @s ^ ^ ^0.75 ~ ~
  13. /execute as @e[tag=c9_orb] at @s if entity @e[tag=c9_mob,distance=..2.0] run damage @e[tag=c9_mob,limit=1,sort=nearest,distance=..2.0] 2 minecraft:magic
  14. /execute as @e[tag=c9_orb] at @s if entity @e[tag=c9_mob,distance=..2.0] run kill @s

How it works

Frames from the test run

Autonomous Siege Gauntlet - frame 1Autonomous Siege Gauntlet - frame 2Autonomous Siege Gauntlet - frame 3

Recorded on our own test server: 58 frames at about 9.6 fps. Our image check saw: Glowing armored mobs march along a blackstone and purpur path toward a magenta beacon while three floating elemental blocks shoot projectiles at them.

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 grass area and stand at the exact center block.
  2. Run the 10 setup commands in order in chat or from impulse command blocks positioned at the center.
  3. Place 14 repeating command blocks set to Always Active underneath or beside the arena.
  4. Paste each of the 14 loop commands into its own repeating command block (adjusting relative coordinates if the blocks are not centered, or wrap them with execute positioned at the arena center).
  5. Set the world time to night to highlight the glowing invaders, turrets, projectiles, and magenta beacon beam.

Use it with real players

You can fight alongside the turrets with no extra setup: because the invaders have NoAI:1b, they keep marching along the track while you intercept survivors with a bow or sword before they reach the central beacon.

Remove it again 6 commands

  1. /kill @e[tag=c9_turret]
  2. /kill @e[tag=c9_mob]
  3. /kill @e[tag=c9_orb]
  4. /scoreboard objectives remove c9t
  5. /fill ~-15 ~-1 ~-11 ~12 ~-1 ~1 minecraft:grass_block
  6. /fill ~-1 ~0 ~-1 ~1 ~1 ~1 minecraft:air

FAQ

Why do the invaders change direction without corner marker entities?

Each path segment uses a different floor block (deepslate tiles, cracked deepslate tiles, and purpur blocks), and the loop checks the block underneath each husk to decide which direction it moves.

Can I make the turrets shoot faster or deal more damage?

Yes. Increase the damage value in the thirteenth loop command from 2 to a higher number, or add extra matching tick checks in the turret firing commands.

Commands used

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

Similar creations

Join 9Minecraft News & Guides