Self-Playing Siege Gauntlet

Build an automated tower defense gauntlet in Minecraft where floating crystal towers blast marching waves of armored undead with homing energy bolts.

Java EditionComplex Contraptions & CinematicsHard24 commandsTested on a real 26.2 & 26.3 server
Glowing defense towers shoot blue particles at armored mobs marching between crying obsidian and sea lantern walls. Download the GIF Video & GIF © www.9minecraft.net

SimulationsDarkMysticHorrorCyanPurpleBlackMini-gameAdventure MapCinematicBlock displaysSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

The Self-Playing Siege Gauntlet transforms a flat arena into a live automated tower defense battlefield. A dark gauntlet road runs between an eerie crying obsidian portal gate and a glowing sea lantern core, flanked by four floating crystal defense towers.

Every few seconds, armored undead invaders march out of the portal toward the core. As they enter range, the floating crystal towers automatically lock on and fire glowing cyan energy bolts that curve through the air and blast the invaders back.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-13 ~-1 ~-3 ~13 ~-1 ~3 polished_blackstone_bricks
  3. /fill ~-13 ~-1 ~-1 ~13 ~-1 ~1 deepslate_tiles
  4. /fill ~-13 ~ ~-4 ~-13 ~4 ~4 crying_obsidian
  5. /fill ~13 ~ ~-2 ~13 ~2 ~2 sea_lantern
  6. /summon marker ~ ~ ~ {Tags:["c9_all","c9_ctrl"]}
  7. /summon block_display ~-6 ~3.5 ~-5 {Tags:["c9_all","c9_twr","c9_t1"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:beacon"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1f,1f,1f],translation:[-0.5f,-0.5f,-0.5f]}}
  8. /summon block_display ~2 ~3.5 ~-5 {Tags:["c9_all","c9_twr","c9_t2"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1f,1f,1f],translation:[-0.5f,-0.5f,-0.5f]}}
  9. /summon block_display ~-2 ~3.5 ~5 {Tags:["c9_all","c9_twr","c9_t1"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:beacon"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1f,1f,1f],translation:[-0.5f,-0.5f,-0.5f]}}
  10. /summon block_display ~6 ~3.5 ~5 {Tags:["c9_all","c9_twr","c9_t2"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:shroomlight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1f,1f,1f],translation:[-0.5f,-0.5f,-0.5f]}}

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

  1. /execute as @e[tag=c9_ctrl] run scoreboard players add @s c9_t 1
  2. /execute as @e[tag=c9_ctrl,scores={c9_t=30..}] run scoreboard players set @s c9_t 0
  3. /execute at @e[tag=c9_twr] run fill ~ ~-3 ~ ~ ~-1 ~ polished_deepslate_wall
  4. /execute at @e[tag=c9_ctrl,scores={c9_t=1}] run summon husk ~-11 ~ ~-1.2 {Tags:["c9_all","c9_mob"],NoAI:1b,Silent:1b,Glowing:1b,Health:14f,equipment:{chest:{id:"minecraft:iron_chestplate",count:1},head:{id:"minecraft:carved_pumpkin",count:1}}}
  5. /execute at @e[tag=c9_ctrl,scores={c9_t=16}] run summon stray ~-11 ~ ~1.2 {Tags:["c9_all","c9_mob"],NoAI:1b,Silent:1b,Glowing:1b,Health:14f,equipment:{chest:{id:"minecraft:golden_chestplate",count:1},head:{id:"minecraft:jack_o_lantern",count:1}}}
  6. /execute as @e[tag=c9_mob] at @s facing ~1 ~ ~ run tp @s ~0.13 ~ ~ ~ 0
  7. /execute at @e[tag=c9_mob] run particle soul_fire_flame ~ ~0.2 ~ 0.2 0.1 0.2 0.01 2 force
  8. /execute as @e[tag=c9_ctrl,scores={c9_t=10}] at @e[tag=c9_t1] if entity @e[tag=c9_mob,distance=..14] run summon area_effect_cloud ~ ~ ~ {Tags:["c9_all","c9_shot"],Duration:45,Radius:0f}
  9. /execute as @e[tag=c9_ctrl,scores={c9_t=25}] at @e[tag=c9_t2] if entity @e[tag=c9_mob,distance=..14] run summon area_effect_cloud ~ ~ ~ {Tags:["c9_all","c9_shot"],Duration:45,Radius:0f}
  10. /execute as @e[tag=c9_shot] at @s facing entity @e[tag=c9_mob,sort=nearest,limit=1] eyes run tp @s ^ ^ ^0.65
  11. /execute at @e[tag=c9_shot] run particle dust{color:[0.1,0.9,1.0],scale:1.6} ~ ~ ~ 0.08 0.08 0.08 0 4 force
  12. /execute at @e[tag=c9_shot] if entity @e[tag=c9_mob,distance=..1.4] run particle explosion ~ ~0.5 ~ 0.2 0.2 0.2 0.05 2 force
  13. /execute as @e[tag=c9_mob] at @s if entity @e[tag=c9_shot,distance=..1.4] run damage @s 6 magic
  14. /execute as @e[tag=c9_shot] at @s if entity @e[tag=c9_mob,distance=..1.4] run kill @s

How it works

Frames from the test run

Self-Playing Siege Gauntlet - frame 1Self-Playing Siege Gauntlet - frame 2Self-Playing Siege Gauntlet - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: Armored mobs with glowing outlines march down a dark stone road from a crying obsidian wall toward a sea lantern wall while four glowing towers shoot blue particles 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. Find a flat open area at least 30x15 blocks in size and stand in the exact center.
  2. Run each of the 10 Setup commands once in chat (or place them in impulse command blocks triggered in order) to build the road, portal, core, and four floating crystal towers.
  3. Place 14 Repeating Command Blocks (or 1 Repeating block chained into 13 Chain Command Blocks) right underneath the center of the arena.
  4. Paste the 14 Loop commands in order into the command blocks and set all of them to Always Active.
  5. Watch the undead invaders march out of the crying obsidian gate while the four towers automatically lock on and fire homing energy bolts.

Use it with real players

To turn this into an interactive mini-game where towers defend against enemy players or where you manually fire the towers, replace tag=c9_mob in loop commands 7 through 13 with type=!player,tag=c9_enemy for custom waves, or trigger loop commands 7 and 8 only when a player holds a specific wand item using if entity @p[nbt={SelectedItem:{id:"minecraft:blaze_rod"}}].

Remove it again 4 commands

  1. /kill @e[tag=c9_all]
  2. /scoreboard objectives remove c9_t
  3. /fill ~-14 ~ ~-6 ~14 ~6 ~6 air
  4. /fill ~-14 ~-1 ~-6 ~14 ~-1 ~6 grass_block

FAQ

Can I change the firing speed or damage of the crystal towers?

Yes! Adjust the reset tick in Loop command 2 (currently 30 ticks, or 1.5 seconds) to make the towers shoot faster, or increase the damage value in Loop command 13 from 6 to a higher number.

Why do the projectiles never pile up or cause lag?

Each projectile is an area_effect_cloud with a maximum Duration of 45 ticks, so even if its target dies before impact, the bolt automatically despawns after 2.25 seconds.

Commands used

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

Similar creations

Join 9Minecraft News & Guides