High-Voltage Arc Barrier

Build a high-voltage arc barrier with two copper pillars that pulse with electric particles and vaporize any creature crossing the hazard zone.

Java EditionParticle ArtMedium24 commandsTested on a real 26.2 & 26.3 server
Three glowing particle beams stretch between two copper pillars on blackstone bases at night. Download the GIF Video & GIF © www.9minecraft.net

Trails & PathsLightningTechnologyIndustrialBlueWhiteCyanMap MakingAdventure MapMini-gameSummoned mobsBlock building (fill/setblock/clone)SoundsLightning boltsRotation math21+ commands

Two industrial copper-and-blackstone pillars crackle to life on a rhythmic three-second cycle, charging their coils before unleashing three tiers of glowing electric beams across a glowing hazard strip.

During each high-voltage surge, any creature that steps between the pillars is struck by lightning damage, bursts into blue plasma flames, and vanishes in an instant.

1. Setup - type these once 10 commands

  1. /fill ~-6 ~-1 ~-2 ~6 ~-1 ~2 polished_deepslate
  2. /fill ~-4 ~-1 ~ ~4 ~-1 ~ sea_lantern
  3. /fill ~-6 ~ ~-1 ~-4 ~ ~1 polished_blackstone_bricks
  4. /fill ~4 ~ ~-1 ~6 ~ ~1 polished_blackstone_bricks
  5. /fill ~-5 ~1 ~ ~-5 ~4 ~ copper_block
  6. /fill ~5 ~1 ~ ~5 ~4 ~ copper_block
  7. /setblock ~-5 ~5 ~ lightning_rod
  8. /setblock ~5 ~5 ~ lightning_rod
  9. /scoreboard objectives add c9_arc dummy
  10. /summon marker ~ ~ ~ {Tags:["c9_ctrl"]}

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

  1. /scoreboard players add @e[tag=c9_ctrl,limit=1] c9_arc 1
  2. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 60.. run scoreboard players set @e[tag=c9_ctrl,limit=1] c9_arc 0
  3. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 1 unless entity @e[tag=c9_mob] run summon zombie ~ ~ ~-5 {Tags:["c9_mob"],DeathLootTable:"minecraft:empty",IsBaby:0b}
  4. /execute as @e[tag=c9_mob,nbt={DeathTime:0s}] at @s facing entity @e[tag=c9_ctrl,limit=1] feet run tp @s ^ ^ ^0.12
  5. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 0..14 run particle electric_spark ~-5 ~3.2 ~ 0.35 1.8 0.35 0.08 8 force
  6. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 0..14 run particle electric_spark ~5 ~3.2 ~ 0.35 1.8 0.35 0.08 8 force
  7. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 12 run playsound minecraft:block.beacon.activate master @a ~ ~ ~ 0.7 1.8
  8. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 12..47 run particle dust{color:[0.15,0.85,1.0],scale:1.6} ~ ~1.3 ~ 2.3 0.06 0.06 0 36 force
  9. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 12..47 run particle dust{color:[0.55,0.98,1.0],scale:1.4} ~ ~2.8 ~ 2.3 0.06 0.06 0 36 force
  10. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 14..45 run particle end_rod ~ ~5.1 ~ 2.1 0.16 0.08 0.01 16 force
  11. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 12..47 run particle electric_spark ~ ~2.2 ~ 2.4 0.9 0.15 0.35 35 force
  12. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 12..47 positioned ~-4 ~ ~-1 as @e[dx=8,dy=4,dz=2,nbt={HurtTime:0s,DeathTime:0s}] at @s run particle soul_fire_flame ~ ~1 ~ 0.35 0.6 0.35 0.15 40 force
  13. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 12..47 positioned ~-4 ~ ~-1 as @e[dx=8,dy=4,dz=2,nbt={HurtTime:0s,DeathTime:0s}] at @s run playsound minecraft:entity.lightning_bolt.impact master @a ~ ~ ~ 0.9 1.6
  14. /execute if score @e[tag=c9_ctrl,limit=1] c9_arc matches 12..47 positioned ~-4 ~ ~-1 as @e[dx=8,dy=4,dz=2,nbt={HurtTime:0s,DeathTime:0s}] run damage @s 50 minecraft:lightning_bolt

How it works

Frames from the test run

High-Voltage Arc Barrier - frame 1High-Voltage Arc Barrier - frame 2High-Voltage Arc Barrier - frame 3

Recorded on our own test server: 32 frames at about 6.4 fps. Our image check saw: Two copper pillars on blackstone bases project three tiers of white and blue particle beams over a sea lantern strip, disintegrating zombies that step into 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 15 by 11 blocks and stand in the exact centre where you want the barrier.
  2. Run each of the 10 setup commands once in chat (or in a line of impulse command blocks positioned at the centre).
  3. Place 14 repeating, always-active, unconditional command blocks nearby and paste one loop command into each block.
  4. If you place the repeating command blocks away from the centre, wrap each loop command with <code>execute positioned X Y Z run ...</code> pointing at the centre coordinates.
  5. Watch the copper pillars charge up and fire electric beams every three seconds, zapping any creature that crosses the sea lantern strip.

Use it with real players

To use this as a pure survival or base-defense barrier without demo zombies appearing automatically, simply omit or remove the 3rd and 4th loop commands (the c9_mob spawner and mover). The remaining loop commands will still charge, fire rhythmic electric arcs, and strike any mob or non-creative player that walks through the active hazard zone.

Remove it again 5 commands

  1. /kill @e[tag=c9_ctrl]
  2. /kill @e[tag=c9_mob]
  3. /scoreboard objectives remove c9_arc
  4. /fill ~-6 ~-1 ~-2 ~6 ~-1 ~2 grass_block
  5. /fill ~-6 ~ ~-2 ~6 ~5 ~2 air

FAQ

Can creatures cross safely between surges?

Yes. The barrier charges from tick 0 to 11, fires lethal arcs from tick 12 to 47, and cools down from tick 48 to 59, creating a brief safe window if you time your sprint.

How do I change the colour or damage of the electric beams?

Edit the RGB array in the <code>dust{color:[R,G,B],scale:...}</code> particle commands using values from 0.0 to 1.0, and adjust the number <code>50</code> in the final <code>/damage</code> command.

Commands used

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

Similar creations

Join 9Minecraft News & Guides