Build four automated purpur defense turrets that track nearby zombies and fire glowing homing arcane bolts to protect a central sea lantern core.
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.
/scoreboard objectives add c9_t dummy/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:purpur_block/fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 minecraft:crying_obsidian/setblock ~ ~ ~ minecraft:sea_lantern/fill ~-4 ~ ~-4 ~-4 ~1 ~-4 minecraft:purpur_pillar/fill ~4 ~ ~-4 ~4 ~1 ~-4 minecraft:purpur_pillar/fill ~-4 ~ ~4 ~-4 ~1 ~4 minecraft:purpur_pillar/fill ~4 ~ ~4 ~4 ~1 ~4 minecraft:purpur_pillar/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}}}}/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}}}}/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}}}}/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}}}}/scoreboard players add #tick c9_t 1/execute as @e[tag=c9_tur] at @s facing entity @e[tag=c9_zom,sort=nearest,limit=1] feet run tp @s ~ ~ ~ ~ ~/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/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}}}/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}}}/execute if score #tick c9_t matches 25.. run scoreboard players set #tick c9_t 0/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}/execute as @e[tag=c9_proj] at @s facing entity @e[tag=c9_zom,sort=nearest,limit=1] eyes run tp @s ^ ^ ^0.65 ~ ~/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/execute at @e[tag=c9_proj] run particle minecraft:end_rod ~ ~ ~ 0.02 0.02 0.02 0.01 1 force/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/execute at @e[tag=c9_proj] as @e[tag=c9_zom,distance=..1.6] run damage @s 7 minecraft:magicsetup #9 Summons an invisible small armor stand on top of the purpur pillar wearing a crying obsidian block with an enchantment glint override in its head equipment slot.loop #4 Rotates each turret armor stand every tick so that its head faces the nearest tagged zombie.loop #9 Every 25 ticks, when at least one enemy is present, each turret spawns a short-lived area effect cloud to act as a homing projectile.loop #10 Steers every active projectile 0.65 blocks forward toward the eyes of the closest zombie using local caret coordinates.loop #14 Deals 7 points of magic damage to any zombie within 1.6 blocks of an incoming energy bolt.


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.
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.
/kill @e[tag=c9_e]/scoreboard objectives remove c9_t/fill ~-5 ~ ~-5 ~5 ~3 ~5 minecraft:air/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:grass_blockMinecraft block IDs must be strictly lowercase snake_case, such as minecraft:sea_lantern, or the parser rejects the command.
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.
▶Tarot Card Arcana Summoning DeckProjectiles & MissilesExpert25 cmds
▶Ferris-Wheel Gondola Revolver CannonProjectiles & MissilesExpert24 cmds
▶Leviathan Water-Dragon Calligrapher ScrollProjectiles & MissilesExpert26 cmds
▶Astral Constellation Lasso Star-CallerProjectiles & MissilesHard22 cmds
▶Black Hole ArrowProjectiles & MissilesMedium20 cmds
▶Bullet-Time VolleyProjectiles & MissilesMedium19 cmds