Spherical Repulsor Barrier

Build a shimmering cyan particle dome that pulses on your stage, violently flinging charging vindicators and incoming spectral arrows backward.

Java EditionParticle ArtMedium24 commandsTested on a real 26.2 & 26.3 server
A glowing cyan particle dome protects a Minecraft villager standing beneath a floating nether star at night. Download the GIF Video & GIF © www.9minecraft.net

Shapes & GeometryTechnologyLightningMysticCyanWhitePvPBoss FightAdventure MapItem displaysRiding & passengersSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

A glowing Spherical Repulsor Barrier forms a protective cyan dome around a central sea lantern pedestal, using spinning ray markers to weave dense dust and electric_spark particles across a 4.5-block hemisphere.

In this self-playing demo, charging vindicators and incoming spectral arrows continuously assault the protected villager inside. The moment any threat touches the barrier, a sonic_boom erupts and radial vector math launches it backward across the grass.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_x dummy
  2. /scoreboard objectives add c9_z dummy
  3. /summon marker ~ ~0.3 ~ {Tags:["c9_core","c9_ray"],Rotation:[0.0f,-5.0f]}
  4. /summon marker ~ ~0.3 ~ {Tags:["c9_ray"],Rotation:[90.0f,-26.0f]}
  5. /summon marker ~ ~0.3 ~ {Tags:["c9_ray"],Rotation:[180.0f,-48.0f]}
  6. /summon marker ~ ~0.3 ~ {Tags:["c9_ray"],Rotation:[270.0f,-72.0f]}
  7. /execute store result score #core c9_x run data get entity @e[tag=c9_core,limit=1] Pos[0] 100
  8. /execute store result score #core c9_z run data get entity @e[tag=c9_core,limit=1] Pos[2] 100
  9. /summon villager ~ ~ ~ {Tags:["c9_bait","c9_safe"],Invulnerable:1b,NoAI:1b,Silent:1b,Passengers:[{id:"minecraft:item_display",Tags:["c9_vis"],item:{id:"minecraft:nether_star",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.9f,0f],scale:[1.0f,1.0f,1.0f]},billboard:"center",brightness:{sky:15,block:15}}]}
  10. /setblock ~ ~-1 ~ sea_lantern

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

  1. /execute as @e[tag=c9_ray] at @s run tp @s ~ ~ ~ ~27 ~
  2. /execute at @e[tag=c9_ray] run particle dust{color:[0.1,0.85,1.0],scale:1.4} ^ ^ ^4.5 0.15 0.15 0.15 0 2 force
  3. /execute at @e[tag=c9_ray] run particle electric_spark ^2.2 ^ ^3.9 0.12 0.12 0.12 0.02 2 force
  4. /execute if entity @e[tag=c9_core,y_rotation=24..30] run summon vindicator ~8.5 ~ ~-2 {Tags:["c9_att"],PersistenceRequired:1b,DeathLootTable:"minecraft:empty"}
  5. /execute if entity @e[tag=c9_core,y_rotation=-93..-87] run summon spectral_arrow ~-9.5 ~2.5 ~-4.5 {Tags:["c9_att"],Motion:[0.95d,0.08d,0.45d],pickup:0b}
  6. /execute if entity @e[tag=c9_core,y_rotation=-30..-24] run kill @e[tag=c9_att,distance=5.5..]
  7. /execute as @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] store result score @s c9_x run data get entity @s Pos[0] 100
  8. /execute as @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] run scoreboard players operation @s c9_x -= #core c9_x
  9. /execute as @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] store result score @s c9_z run data get entity @s Pos[2] 100
  10. /execute as @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] run scoreboard players operation @s c9_z -= #core c9_z
  11. /execute as @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] run data merge entity @s {Motion:[0.0d,0.38d,0.0d]}
  12. /execute as @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] store result entity @s Motion[0] double 0.0022 run scoreboard players get @s c9_x
  13. /execute as @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] store result entity @s Motion[2] double 0.0022 run scoreboard players get @s c9_z
  14. /execute at @e[tag=!c9_safe,type=!marker,type=!item_display,type=!item,type=!player,distance=..4.8] run particle sonic_boom ~ ~1 ~ 0 0 0 0 1 force

How it works

Frames from the test run

Spherical Repulsor Barrier - frame 1Spherical Repulsor Barrier - frame 2Spherical Repulsor Barrier - frame 3

Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A villager stands on a sea lantern beneath a floating nether star surrounded by a cyan dust and white spark particle dome, while a defeated mob lies red and smoking outside the barrier.

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. Clear a flat area at least 25x25 blocks wide and stand at the exact center where you want the barrier.
  2. Run the 10 setup commands in order from chat (or place them in impulse command blocks at the center) to create the scoreboards, dome markers, core beacon, and protected villager.
  3. Place 14 repeating command blocks set to Always Active near the center, making sure they stay loaded.
  4. Paste each of the 14 loop commands into one repeating command block, adjusting the spawn coordinates if you do not want the demo's automatic vindicator and arrow waves.
  5. Watch the shimmering cyan dome form and test it by firing arrows or spawning mobs outside the barrier.

Use it with real players

Players are already ignored by the repulsion filter (type=!player), so you can step inside your own dome freely. To keep the barrier in survival without automatic demo attackers, leave out loop commands 3, 4, and 5; to make the dome follow you, teleport c9_ray and c9_vis to @p and refresh #core c9_x and #core c9_z from your position each tick.

Remove it again 8 commands

  1. /kill @e[tag=c9_ray]
  2. /kill @e[tag=c9_core]
  3. /kill @e[tag=c9_vis]
  4. /kill @e[tag=c9_bait]
  5. /kill @e[tag=c9_att]
  6. /scoreboard objectives remove c9_x
  7. /scoreboard objectives remove c9_z
  8. /setblock ~ ~-1 ~ grass_block

FAQ

Can I use this barrier to protect my base without the spawning vindicators and arrows?

Yes. Simply skip loop commands 3, 4, and 5 (index 3, 4, and 5) when setting up the repeating command blocks. The dome will still deflect real arrows, tridents, and any hostile mobs that approach.

Why does the barrier push things outward cleanly anywhere in my world?

During setup, the creation records the exact X and Z coordinates of <code>c9_core</code> into the <code>c9_x</code> and <code>c9_z</code> scoreboards. Every deflection subtracts those center coordinates from the intruder's position to calculate a true outward vector.

Commands used

/data/execute/kill/particle/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides