Shulker Defense Turrets

Build four automated purpur defense turrets that track nearby zombies and fire glowing homing arcane bolts to protect a central sea lantern core.

Java EditionWands, Weapons & ToolsMedium24 commandsTested on a real 26.2 & 26.3 server
Four purpur and obsidian defense turrets fire curving purple energy trails at a glowing zombie. Download the GIF Video & GIF © www.9minecraft.net

Projectiles & MissilesEndMysticPurpleWhiteCyanMini-gameAdventure MapPvPParticlesArmor standsScoreboard timersExecute chainsSummoned mobsBlock building (fill/setblock/clone)Glowing outlinesRotation math21+ commands

This command creation builds a fortified purpur base with a glowing sea lantern core at the center and four automated defense turrets on the corners. Each tower holds a floating enchanted crying obsidian core that rotates to track approaching threats.

As waves of glowing zombies spawn around the perimeter, the four turrets fire homing purple energy bolts that weave through the air and strike targets with bursts of witch magic and levitation sparks.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:purpur_block
  3. /fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:crying_obsidian
  4. /setblock ~ ~ ~ minecraft:sea_lantern
  5. /fill ~-4 ~ ~-4 ~-4 ~1 ~-4 minecraft:purpur_pillar
  6. /fill ~4 ~ ~-4 ~4 ~1 ~-4 minecraft:purpur_pillar
  7. /fill ~-4 ~ ~4 ~-4 ~1 ~4 minecraft:purpur_pillar
  8. /fill ~4 ~ ~4 ~4 ~1 ~4 minecraft:purpur_pillar
  9. /summon minecraft:armor_stand ~-4 ~1.6 ~-4 {Tags:["c9_tur","c9_e"],NoGravity:1b,Invisible:1b,Small:1b,equipment:{head:{id:"minecraft:crying_obsidian",count:1,components:{"minecraft:enchantment_glint_override":true}}}}
  10. /summon minecraft:armor_stand ~4 ~1.6 ~-4 {Tags:["c9_tur","c9_e"],NoGravity:1b,Invisible:1b,Small:1b,equipment:{head:{id:"minecraft:crying_obsidian",count:1,components:{"minecraft:enchantment_glint_override":true}}}}

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

  1. /execute positioned ~4 ~1.6 ~4 unless entity @e[tag=c9_tur,distance=..1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_tur","c9_e"],NoGravity:1b,Invisible:1b,Small:1b,equipment:{head:{id:"minecraft:crying_obsidian",count:1,components:{"minecraft:enchantment_glint_override":true}}}}
  2. /execute positioned ~-4 ~1.6 ~4 unless entity @e[tag=c9_tur,distance=..1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["c9_tur","c9_e"],NoGravity:1b,Invisible:1b,Small:1b,equipment:{head:{id:"minecraft:crying_obsidian",count:1,components:{"minecraft:enchantment_glint_override":true}}}}
  3. /scoreboard players add #tick c9_t 1
  4. /execute as @e[tag=c9_tur] at @s facing entity @e[tag=c9_zom,sort=nearest,limit=1] feet run tp @s ~ ~ ~ ~ ~
  5. /execute if score #tick c9_t matches 5 if entity @e[tag=c9_zom,limit=6] run particle minecraft:portal ~ ~1 ~ 0.5 0.5 0.5 0.5 15 force
  6. /execute if score #tick c9_t matches 10 unless entity @e[tag=c9_zom,distance=..16,limit=8] run summon minecraft:zombie ~9 ~ ~6 {Tags:["c9_zom","c9_e"],Glowing:1b,Health:14f,equipment:{head:{id:"minecraft:iron_helmet",count:1}}}
  7. /execute if score #tick c9_t matches 20 unless entity @e[tag=c9_zom,distance=..16,limit=8] run summon minecraft:zombie ~-9 ~ ~-6 {Tags:["c9_zom","c9_e"],Glowing:1b,Health:14f,equipment:{head:{id:"minecraft:golden_helmet",count:1}}}
  8. /execute if score #tick c9_t matches 25.. run scoreboard players set #tick c9_t 0
  9. /execute if score #tick c9_t matches 15 if entity @e[tag=c9_zom] at @e[tag=c9_tur] run summon minecraft:area_effect_cloud ~ ~0.6 ~ {Tags:["c9_proj","c9_e"],Duration:50,Radius:0f}
  10. /execute as @e[tag=c9_proj] at @s facing entity @e[tag=c9_zom,sort=nearest,limit=1] eyes run tp @s ^ ^ ^0.65 ~ ~
  11. /execute at @e[tag=c9_proj] run particle minecraft:dust{color:[0.85,0.2,1.0],scale:1.6} ~ ~ ~ 0.08 0.08 0.08 0 4 force
  12. /execute at @e[tag=c9_proj] run particle minecraft:end_rod ~ ~ ~ 0.02 0.02 0.02 0.01 1 force
  13. /execute as @e[tag=c9_proj] at @s if entity @e[tag=c9_zom,distance=..1.6] run particle minecraft:witch ~ ~ ~ 0.3 0.3 0.3 0.1 20 force
  14. /execute at @e[tag=c9_proj] as @e[tag=c9_zom,distance=..1.6] run damage @s 7 minecraft:magic

How it works

Frames from the test run

Shulker Defense Turrets - frame 1Shulker Defense Turrets - frame 2Shulker Defense Turrets - frame 3

Recorded on our own test server: 57 frames at about 9.5 fps. Our image check saw: A purpur platform with a sea lantern center and four corner pillars topped with floating crying obsidian blocks shoots curving purple and white particle beams at a glowing zombie.

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 where you want your defended base to appear.
  2. Run each of the 10 setup commands in chat or in impulse command blocks positioned at the center.
  3. Place a line of 14 repeating command blocks set to Always Active nearby.
  4. Paste one loop command into each repeating command block, making sure they execute positioned at your central sea lantern.
  5. Watch the four corner turrets automatically detect, track, and fire homing bolts at the incoming zombies.

Use it with real players

To make the turrets defend you against all naturally spawning hostile mobs in your world instead of just the demo zombies, replace tag=c9_zom in the loop commands with type=#minecraft:raiders or type=zombie, and remove the two zombie summoning commands from the loop.

Remove it again 4 commands

  1. /kill @e[tag=c9_e]
  2. /scoreboard objectives remove c9_t
  3. /fill ~-5 ~ ~-5 ~5 ~3 ~5 minecraft:air
  4. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:grass_block

FAQ

Why did the sea lantern fail to place in older command drafts?

Minecraft block IDs must be strictly lowercase snake_case, such as minecraft:sea_lantern, or the parser rejects the command.

Can I add more turrets around my base?

Yes! Summon additional armor stands with the c9_tur tag on top of any pillar you build, and they will automatically aim and fire alongside the original four.

Commands used

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

Similar creations

Join 9Minecraft News & Guides