Summon a living swarm of glowing fireflies in Minecraft using vanilla commands. They drift around an anchor, casting real moving light and warm particles.
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.
/scoreboard objectives add c9_timer dummy/fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 minecraft:moss_block replace minecraft:grass_block/setblock ~ ~ ~ minecraft:flowering_azalea/summon minecraft:marker ~ ~1.5 ~ {Tags:["c9_center"]}/summon minecraft:bat ~2 ~2 ~ {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}/summon minecraft:bat ~-2 ~2 ~1 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}/summon minecraft:bat ~1 ~3 ~-2 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}/summon minecraft:bat ~-1 ~1 ~-2 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}/summon minecraft:bat ~3 ~2 ~2 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}/summon minecraft:bat ~-3 ~3 ~-1 {Tags:["c9_bug"],Silent:1b,active_effects:[{id:"minecraft:invisibility",duration:-1,amplifier:0,show_particles:0b}]}/scoreboard players add @e[tag=c9_center] c9_timer 1/fill ~-12 ~ ~-12 ~12 ~8 ~12 minecraft:air replace minecraft:light/execute as @e[tag=c9_bug] at @s if block ~ ~ ~ minecraft:air run setblock ~ ~ ~ minecraft:light[level=12]/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/execute as @e[tag=c9_bug] at @s run particle minecraft:wax_on ~ ~0.2 ~ 0.45 0.45 0.45 0 2 force/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/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/execute as @e[tag=c9_bug] at @s if block ~ ~-4 ~ minecraft:air run tp @s ~ ~-0.25 ~/execute as @e[tag=c9_bug] at @s unless block ~ ~-1 ~ minecraft:air run tp @s ~ ~0.25 ~/execute at @e[tag=c9_center] run particle minecraft:spore_blossom_air ~ ~1 ~ 3 2 3 0 5 force/execute at @e[tag=c9_center,scores={c9_timer=45..}] run playsound minecraft:block.amethyst_block.chime master @a ~ ~ ~ 0.4 1.8/scoreboard players set @e[tag=c9_center,scores={c9_timer=45..}] c9_timer 0setup #5 Summons an invisible, silent bat tagged <code>c9_bug</code>. Bats naturally flutter and change direction unpredictably, making them ideal AI drivers for flying insects.loop #2 Clears all invisible <code>minecraft:light</code> blocks around the anchor every tick before placing new ones, preventing permanent light trails from being left behind.loop #3 Places a temporary level-12 invisible light block at each glowbug's current position if it is in air, creating real dynamic lighting on the ground below.loop #4 Spawns colour-transitioning dust particles shifting from warm golden yellow to lime green around each invisible bat.loop #7 Tethers the swarm to the <code>c9_center</code> marker. Whenever a bat flies more than 5.5 blocks away from the centre, it is gently pulled back inward.


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.
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.
/fill ~-12 ~ ~-12 ~12 ~8 ~12 minecraft:air replace minecraft:light/setblock ~ ~ ~ minecraft:air/fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 minecraft:grass_block replace minecraft:moss_block/kill @e[tag=c9_bug]/kill @e[tag=c9_center]/scoreboard objectives remove c9_timerBats have built-in erratic flight pathfinding. Letting their natural AI handle the fluttering saves commands while producing organic insect movement.
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.
/execute/fill/particle/playsound/scoreboard/setblock/summon/tp
▶Swirling Murmuration of Starling ParticlesTrails & PathsExpert23 cmds
▶Swarm of Glowing FirefliesTrails & PathsEasy24 cmds
▶Bioluminescent Twilight SwarmTrails & PathsEasy22 cmds
▶Rolling Japanese Karakuri Tea AutomatonTrails & PathsExpert24 cmds
▶Ambient Firefly SwarmTrails & PathsEasy22 cmds
▶Creeping Block Plague: Autonomous Terrain CorruptionTrails & PathsMedium21 cmds