Heavenly Phantom Defense Shrine

Build a glowing quartz and gold shrine with a floating celestial orb that locks onto swooping phantoms and strikes them down with beams of light.

Java EditionSky & WeatherEasy24 commandsTested on a real 26.2 & 26.3 server
A glowing quartz and gold shrine strikes down nearby phantoms with pillars of white celestial particles. Download the GIF Video & GIF © www.9minecraft.net

Eclipses & Celestial EventsHoly & LightMysticRoyalWhiteGoldDecorationAdventure MapMap MakingItem displaysSummoned mobsBlock building (fill/setblock/clone)Status effectsRotation math21+ commands

Phantoms can ruin any peaceful night build, but this Heavenly Phantom Defense shrine clears the skies with style. A glowing quartz and gold altar sits at the center of your base with a floating celestial orb spinning gently above it.

Whenever a phantom swoops too close, the orb locks onto the monster, marks it with a golden aura, and calls down a pillar of celestial particles to destroy it before it can attack.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 quartz_bricks
  3. /fill ~-1 ~ ~-1 ~1 ~ ~1 chiseled_quartz_block
  4. /setblock ~ ~1 ~ gold_block
  5. /setblock ~ ~2 ~ beacon
  6. /setblock ~-2 ~ ~-2 sea_lantern
  7. /setblock ~2 ~ ~-2 sea_lantern
  8. /setblock ~-2 ~ ~2 sea_lantern
  9. /setblock ~2 ~ ~2 sea_lantern
  10. /summon item_display ~ ~4.5 ~ {Tags:["c9_core"],Glowing:1b,glow_color_override:16766720,item:{id:"minecraft:end_crystal"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.3f,1.3f,1.3f],translation:[0f,0f,0f]}}

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

  1. /scoreboard players add #t c9_t 1
  2. /execute if score #t c9_t matches 80.. run scoreboard players set #t c9_t 0
  3. /execute as @e[tag=c9_core] at @s run tp @s ~ ~ ~ ~6 ~
  4. /execute at @e[tag=c9_core] run particle dust{color:[1.0,0.85,0.2],scale:1.4} ~ ~ ~ 0.6 0.6 0.6 0 5 force
  5. /execute at @e[tag=c9_core] run particle end_rod ~ ~-1 ~ 0.3 0.5 0.3 0.02 2 force
  6. /execute if score #t c9_t matches 5 run summon phantom ~6 ~7 ~-5 {Tags:["c9_ph"],Size:2}
  7. /execute if score #t c9_t matches 30 run summon phantom ~-6 ~8 ~4 {Tags:["c9_ph"],Size:2}
  8. /execute if score #t c9_t matches 55 run summon phantom ~5 ~7 ~6 {Tags:["c9_ph"],Size:2}
  9. /execute as @e[type=phantom,tag=c9_ph] at @s run tp @s ~ ~-0.06 ~ ~4 ~
  10. /execute as @e[type=phantom,tag=c9_ph] at @s run scoreboard players add @s c9_t 1
  11. /execute as @e[type=phantom,tag=c9_ph,scores={c9_t=10..30}] at @s run effect give @s glowing 2 0 true
  12. /execute at @e[type=phantom,tag=c9_ph,scores={c9_t=10..30}] run particle dust{color:[1.0,0.9,0.3],scale:2.0} ~ ~0.5 ~ 0.5 0.5 0.5 0 10 force
  13. /execute at @e[type=phantom,tag=c9_ph,scores={c9_t=31}] run particle end_rod ~ ~ ~ 0.4 7 0.4 0.03 200 force
  14. /execute as @e[type=phantom,tag=c9_ph,scores={c9_t=32..}] at @s run damage @s 100 minecraft:magic

How it works

Frames from the test run

Heavenly Phantom Defense Shrine - frame 1Heavenly Phantom Defense Shrine - frame 2Heavenly Phantom Defense Shrine - frame 3

Recorded on our own test server: 45 frames at about 9.0 fps. Our image check saw: A quartz and gold altar with a floating golden orb marks incoming phantoms with a glowing aura and strikes them down with vertical pillars of white particles.

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 shrine and run the 10 setup commands in chat.
  2. Place a chain of 14 command blocks nearby, starting with a Repeating command block and 13 Chain command blocks.
  3. Set all 14 command blocks to Always Active.
  4. Paste each loop command in order into the command blocks, using execute positioned at the shrine center if your command blocks are placed away from it.
  5. Switch the time to night and watch the shrine automatically target and smite incoming phantoms.

Use it with real players

To use this as a real survival defense turret instead of a self-running demo, remove loop commands 6, 7, 8, and 9 (which summon and move the demo phantoms). Then replace tag=c9_ph in the remaining loop commands with distance=..24 so the shrine locks onto any natural phantom that flies within 24 blocks of the orb.

Remove it again 5 commands

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

FAQ

Does the shrine hurt players or pets nearby?

No, the targeting selector explicitly filters for <code>type=phantom</code>, so players, villagers, and pets are completely safe around the beam.

Can I change the range of the defense shrine?

Yes, when using the player version selector, change <code>distance=..24</code> to a larger radius like <code>distance=..40</code> to protect a wider base.

Commands used

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

Similar creations

Join 9Minecraft News & Guides