Dynamic Glowbug Swarm

Summon a living swarm of glowing fireflies in Minecraft using vanilla commands. They drift around an anchor, casting real moving light and warm particles.

Java EditionParticle ArtEasy22 commandsTested on a real 26.2 & 26.3 server
Swarms of glowing golden firefly particles drift across a grassy shore at night, illuminating the ground below. Download the GIF Video & GIF © www.9minecraft.net

Trails & PathsNatureCuteMysticYellowOrangeWhiteDecorationMap MakingAdventure MapSummoned mobsBlock building (fill/setblock/clone)SoundsRotation math21+ commands

Bring warm ambient life to dark builds with a dynamic swarm of glowing fireflies. Dozens of golden specks drift and bob around an invisible anchor, creating a shifting cloud of warm particles and glowing embers.

Unlike static particle effects, these glowbugs place and clean up temporary invisible light blocks as they fly, casting real moving light across nearby terrain and builds.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 minecraft:moss_block replace minecraft:grass_block
  3. /setblock ~ ~ ~ minecraft:flowering_azalea
  4. /summon minecraft:marker ~ ~1.5 ~ {Tags:["c9_center"]}
  5. /summon minecraft:bat ~2 ~2 ~ {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}
  6. /summon minecraft:bat ~-2 ~2 ~1 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}
  7. /summon minecraft:bat ~1 ~3 ~-2 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}
  8. /summon minecraft:bat ~-1 ~1 ~-2 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}
  9. /summon minecraft:bat ~3 ~2 ~2 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}
  10. /summon minecraft:bat ~-3 ~3 ~-1 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}

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

  1. /scoreboard players add @e[tag=c9_center] c9_timer 1
  2. /fill ~-12 ~ ~-12 ~12 ~8 ~12 minecraft:air replace minecraft:light
  3. /execute as @e[tag=c9_bug] at @s if block ~ ~ ~ minecraft:air run setblock ~ ~ ~ minecraft:light[level=12]
  4. /execute as @e[tag=c9_bug] at @s run particle minecraft:dust_color_transition{from_color:[1.0,0.85,0.2],to_color:[0.6,1.0,0.1],scale:1.4} ~ ~0.2 ~ 0.25 0.25 0.25 0 4 force
  5. /execute as @e[tag=c9_bug] at @s run particle minecraft:wax_on ~ ~0.2 ~ 0.45 0.45 0.45 0 2 force
  6. /execute as @e[tag=c9_bug] at @s run particle minecraft:end_rod ~ ~-0.2 ~ 0.6 0.4 0.6 0.01 1 force
  7. /execute at @e[tag=c9_center] as @e[tag=c9_bug,distance=5.5..] at @s facing entity @e[tag=c9_center,limit=1] eyes run tp @s ^ ^ ^0.35
  8. /execute as @e[tag=c9_bug] at @s if block ~ ~-4 ~ minecraft:air run tp @s ~ ~-0.25 ~
  9. /execute as @e[tag=c9_bug] at @s unless block ~ ~-1 ~ minecraft:air run tp @s ~ ~0.25 ~
  10. /execute at @e[tag=c9_center] run particle minecraft:spore_blossom_air ~ ~1 ~ 3 2 3 0 5 force
  11. /execute at @e[tag=c9_center,scores={c9_timer=45..}] run playsound minecraft:block.amethyst_block.chime master @a ~ ~ ~ 0.4 1.8
  12. /scoreboard players set @e[tag=c9_center,scores={c9_timer=45..}] c9_timer 0

How it works

Frames from the test run

Dynamic Glowbug Swarm - frame 1Dynamic Glowbug Swarm - frame 2Dynamic Glowbug Swarm - frame 3

Recorded on our own test server: 57 frames at about 9.5 fps. Our image check saw: Clusters of glowing yellow, orange, and white particles drift over a grassy area at night, visibly illuminating the ground beneath them.

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. Enable command blocks on your world or server and switch to Creative mode.
  2. Stand where you want the swarm to hover and run each of the setup commands once in chat.
  3. Place a column or line of 12 repeating command blocks nearby, all set to Always Active.
  4. Paste one loop command into each repeating command block.
  5. Set the time to night with /time set night to see the dynamic lighting and glowing particles clearly.

Use it with real players

To make the glowbug swarm follow a player instead of hovering in place, remove the c9_center marker and replace @e[tag=c9_center] in the loop commands with @p (and run the light cleanup /fill command via /execute at @p run fill ...). The fireflies will drift around you and light up caves as you walk.

Remove it again 6 commands

  1. /fill ~-12 ~ ~-12 ~12 ~8 ~12 minecraft:air replace minecraft:light
  2. /setblock ~ ~ ~ minecraft:air
  3. /fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 minecraft:grass_block replace minecraft:moss_block
  4. /kill @e[tag=c9_bug]
  5. /kill @e[tag=c9_center]
  6. /scoreboard objectives remove c9_timer

FAQ

Why use invisible bats instead of armor stands?

Bats have built-in erratic flight pathfinding. Letting their natural AI handle the fluttering saves commands while producing organic insect movement.

Will the light blocks overwrite my builds?

No. The setblock command checks that the space is air before placing a light block, and the cleanup fill command only replaces light blocks back into air.

Commands used

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

Similar creations

Join 9Minecraft News & Guides