Spectral Armor Guardian

Build an autonomous Spectral Armor Guardian turret in Minecraft Java 26.x using command blocks, display entities, soul fire, and sonic boom strikes.

Java EditionMagic & SpellsHard21 commandsTested on a real 26.2 & 26.3 server
A glowing spectral armor guardian with orbiting diamond swords hovers above a smoking soul fire shrine. Download the GIF Video & GIF © www.9minecraft.net

Summoning CirclesDarkMysticMedievalCyanBlackWhiteAdventure MapBoss FightPvPItem displaysArmor standsRiding & passengersSummoned mobsBlock building (fill/setblock/clone)Glowing outlinesRotation math21+ commands

The Spectral Armor Guardian is an automated magical turret powered by soul fire and command blocks. At the center of a dark blackstone shrine rests an inactive suit of iron armor, while its awakened diamond spirit hovers above, surrounded by four orbiting enchanted blades.

When hostile mobs wander near the shrine, the floating guardian locks onto them and unleashes soul beams and sonic shockwaves to defend the area automatically.

1. Setup - type these once 8 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 chiseled_polished_blackstone
  3. /fill ~-2 ~ ~-2 ~2 ~ ~2 soul_campfire replace air
  4. /fill ~-1 ~ ~-1 ~1 ~ ~1 air
  5. /setblock ~ ~-1 ~ soul_lantern
  6. /summon armor_stand ~ ~ ~ {Tags:["c9_base"],NoGravity:1b,Invulnerable:1b,ShowArms:1b,NoBasePlate:1b,Equipment:{chest:{id:"minecraft:iron_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:iron_boots",count:1},head:{id:"minecraft:skeleton_skull",count:1}}}
  7. /summon armor_stand ~ ~2.2 ~ {Tags:["c9_guardian"],NoGravity:1b,Invisible:1b,Invulnerable:1b,ShowArms:1b,Glowing:1b,Pose:{RightArm:[-95f,-20f,0f],LeftArm:[-95f,20f,0f]},Equipment:{mainhand:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},offhand:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},head:{id:"minecraft:diamond_helmet",count:1,components:{"minecraft:enchantment_glint_override":true}},chest:{id:"minecraft:diamond_chestplate",count:1,components:{"minecraft:enchantment_glint_override":true}}}}
  8. /summon item_display ~ ~3.1 ~ {Tags:["c9_blade"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},transformation:{translation:[1.4f,0f,0f],left_rotation:[0f,0f,0.707f,0.707f],scale:[1.2f,1.2f,1.2f],right_rotation:[0f,0f,0f,1f]},Passengers:[{id:"minecraft:item_display",Tags:["c9_blade"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},transformation:{translation:[-1.4f,0f,0f],left_rotation:[0f,0f,0.707f,0.707f],scale:[1.2f,1.2f,1.2f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Tags:["c9_blade"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},transformation:{translation:[0f,0f,1.4f],left_rotation:[0f,0f,0.707f,0.707f],scale:[1.2f,1.2f,1.2f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:item_display",Tags:["c9_blade"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},transformation:{translation:[0f,0f,-1.4f],left_rotation:[0f,0f,0.707f,0.707f],scale:[1.2f,1.2f,1.2f],right_rotation:[0f,0f,0f,1f]}}]}

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

  1. /scoreboard players add #c9_tick c9_timer 1
  2. /execute if score #c9_tick c9_timer matches 80.. run scoreboard players set #c9_tick c9_timer 1
  3. /execute as @e[tag=c9_blade] at @s run tp @s ~ ~ ~ ~10 ~
  4. /execute at @e[tag=c9_guardian] run particle soul_fire_flame ~ ~0.7 ~ 0.4 0.5 0.4 0.02 4 force
  5. /execute at @e[tag=c9_guardian] run particle dust{color:[0.1,0.95,1.0],scale:1.5} ~ ~1.0 ~ 0.6 0.6 0.6 0 5 force
  6. /execute at @e[tag=c9_base] run particle sculk_soul ~ ~0.8 ~ 0.25 0.4 0.25 0.02 1 force
  7. /execute as @e[tag=c9_guardian] at @s if entity @e[tag=c9_mob,distance=..15] run tp @s ~ ~ ~ facing entity @e[tag=c9_mob,distance=..15,limit=1,sort=nearest] eyes
  8. /execute as @e[tag=c9_guardian] at @s unless entity @e[tag=c9_mob,distance=..15] run tp @s ~ ~ ~ ~5 ~
  9. /execute store result score #c9_mobs c9_timer if entity @e[tag=c9_mob]
  10. /execute if score #c9_mobs c9_timer matches ..2 if score #c9_tick c9_timer matches 1 run summon husk ~5 ~ ~4 {Tags:["c9_mob"],Glowing:1b}
  11. /execute if score #c9_mobs c9_timer matches ..2 if score #c9_tick c9_timer matches 40 run summon stray ~-5 ~ ~-4 {Tags:["c9_mob"],Glowing:1b}
  12. /execute if score #c9_tick c9_timer matches 25 as @e[tag=c9_mob,distance=..15,limit=1,sort=nearest] at @s run particle sonic_boom ~ ~1.2 ~ 0 0 0 0 1 force
  13. /execute if score #c9_tick c9_timer matches 25 as @e[tag=c9_mob,distance=..15,limit=1,sort=nearest] at @s run damage @s 14 minecraft:magic

How it works

Frames from the test run

Spectral Armor Guardian - frame 1Spectral Armor Guardian - frame 2Spectral Armor Guardian - frame 3

Recorded on our own test server: 56 frames at about 9.3 fps. Our image check saw: A glowing armor stand surrounded by four orbiting diamond swords hovers in smoke above a soul campfire shrine, with glowing hostile mobs nearby.

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. Create a flat clearing and stand at the exact center block where you want the shrine.
  2. Run each of the 8 setup commands in chat one by one to build the blackstone base, soul campfires, vessel armor, and floating spectral guardian.
  3. Place a line of 13 repeating command blocks nearby, set them all to Always Active, and paste one loop command into each block.
  4. Watch the guardian spin its spectral blades and automatically strike down the spawned husks and strays.

Use it with real players

To make the turret defend you against natural survival monsters instead of only demo mobs, replace tag=c9_mob in loop commands 7, 8, 12, and 13 with type=#minecraft:raiders or type=!player,type=!armor_stand,type=!item_display,type=!item, and remove loop commands 9, 10, and 11 so it no longer spawns test mobs.

Remove it again 7 commands

  1. /kill @e[tag=c9_base]
  2. /kill @e[tag=c9_guardian]
  3. /kill @e[tag=c9_blade]
  4. /kill @e[tag=c9_mob]
  5. /fill ~-2 ~ ~-2 ~2 ~ ~2 air
  6. /fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 grass_block
  7. /scoreboard objectives remove c9_timer

FAQ

Why do the floating swords stay spaced apart when rotating?

Each sword is an item_display with a translation offset of 1.4 blocks along the X or Z axis, so rotating the entities rotates their offset orbit around the center point.

Can I change the attack speed of the guardian?

Yes. Lower the reset threshold in loop command 2 from 80.. to 40.. to make the guardian fire its sonic boom every 2 seconds instead of every 4 seconds.

Commands used

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

Similar creations

Join 9Minecraft News & Guides