Roaming Ball Lightning

Summon a glowing ball lightning anomaly that orbits a copper arena and discharges vivid electric arcs toward nearby conductive pillars in Vanilla Minecraft.

Java EditionParticle ArtMedium24 commandsTested on a real 26.2 & 26.3 server
A glowing blue orb high in the night sky shoots a particle beam at a copper pillar. Download the GIF Video & GIF © www.9minecraft.net

Rings & OrbitsLightningTechnologyDarkCyanBlueWhiteBoss FightDecorationMap MakingBlock displaysBlock building (fill/setblock/clone)Rotation math21+ commands

Roaming Ball Lightning creates a volatile sphere of plasma that hovers and weaves through an arena of four oxidized copper pillars. As the glowing sea lantern core drifts closer to a pillar, it fires a rapid stream of cyan and blue electrical bolts that impact the lightning rods with bursts of golden sparks.

The effect combines block_display entities, custom dust color transitions, and dynamic raycasting markers that trace the shortest path between the moving sphere and the nearest conductor every few ticks.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /scoreboard objectives add c9_life dummy
  3. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 deepslate_tiles
  4. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 cut_copper
  5. /forceload add ~ ~
  6. /summon marker ~6 ~ ~6 {Tags:["c9_pillar","c9_init"]}
  7. /summon marker ~-6 ~ ~6 {Tags:["c9_pillar","c9_init"]}
  8. /summon marker ~6 ~ ~-6 {Tags:["c9_pillar","c9_init"]}
  9. /summon marker ~-6 ~ ~-6 {Tags:["c9_pillar","c9_init"]}
  10. /summon block_display ~ ~2.5 ~ {Tags:["c9_ball"],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.7f,0.7f,0.7f],translation:[-0.35f,-0.35f,-0.35f]}}

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

  1. /execute as @e[tag=c9_init] at @s run fill ~ ~ ~ ~ ~2 ~ weathered_cut_copper
  2. /execute as @e[tag=c9_init] at @s run setblock ~ ~3 ~ sea_lantern
  3. /execute as @e[tag=c9_init] at @s run setblock ~ ~4 ~ lightning_rod
  4. /execute as @e[tag=c9_init] at @s run tp @s ~ ~4.5 ~
  5. /tag @e[tag=c9_init] remove c9_init
  6. /execute as @e[tag=c9_ball] at @s facing ~ ~2.5 ~ run tp @s ^0.18 ^ ^0.14 ~6 ~
  7. /execute as @e[tag=c9_ball] at @s if entity @s[distance=6.5..] facing ~ ~2.5 ~ run tp @s ^ ^ ^0.35 ~10 ~
  8. /execute as @e[tag=c9_ball] at @s run particle dust_color_transition{from_color:[0.1,0.9,1.0],to_color:[0.1,0.2,1.0],scale:1.6} ~ ~ ~ 0.45 0.45 0.45 0 12 force
  9. /execute as @e[tag=c9_ball] at @s run particle electric_spark ~ ~ ~ 0.6 0.6 0.6 0.15 8 force
  10. /scoreboard players add #ball c9_tick 1
  11. /execute if score #ball c9_tick matches 3.. at @e[tag=c9_ball] run summon area_effect_cloud ~ ~ ~ {Tags:["c9_arc"],Duration:12}
  12. /execute if score #ball c9_tick matches 3.. run scoreboard players set #ball c9_tick 0
  13. /execute as @e[tag=c9_arc] at @s facing entity @n[tag=c9_pillar] eyes run tp @s ^ ^ ^0.75
  14. /execute as @e[tag=c9_arc] at @s run particle dust{color:[0.4,0.95,1.0],scale:1.1} ~ ~ ~ 0.12 0.12 0.12 0 4 force

How it works

Frames from the test run

Roaming Ball Lightning - frame 1Roaming Ball Lightning - frame 2Roaming Ball Lightning - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A small glowing cyan orb ascends high into the night sky above an arena with four copper pillars, firing a blue and cyan particle beam with an expanding particle ring down onto one pillar's lightning rod.

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 and run the 10 setup commands in chat to create the copper floor, the scoreboard objectives, the 4 corner markers, and the glowing ball core.
  2. Place a line of 14 repeating command blocks set to Always Active near the stage.
  3. Paste one loop command into each repeating command block in order.
  4. Wrap or position the command block execution at the stage center so relative coordinates align with the arena.
  5. Switch the time to night to make the cyan glow and electric dust particles stand out against the dark floor.

Use it with real players

To make the ball lightning attack nearby players instead of pillars, replace @n[tag=c9_pillar] in loop command 13 with @p[distance=..10] and execute a damage command when the c9_arc entity gets within 1.5 blocks of a player.

Remove it again 7 commands

  1. /kill @e[tag=c9_ball]
  2. /kill @e[tag=c9_pillar]
  3. /kill @e[tag=c9_arc]
  4. /scoreboard objectives remove c9_tick
  5. /scoreboard objectives remove c9_life
  6. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 grass_block
  7. /fill ~-9 ~ ~-9 ~9 ~6 ~9 air

FAQ

Why use an Area Effect Cloud for the lightning arcs instead of a Marker?

Area Effect Clouds have a built-in Duration NBT tag that despawns them automatically after a set number of ticks, saving command block space while preventing entity buildup.

Can I add more conductive pillars around the stage?

Yes! Summon additional markers with the tags c9_pillar and c9_init anywhere within the arena, and the loop commands will automatically build a pillar and begin arcing electricity to it when the ball drifts nearby.

Commands used

/execute/fill/forceload/particle/scoreboard/setblock/summon/tag/tp

Similar creations

Join 9Minecraft News & Guides