Contagious Plague Outbreak Simulation

Build a quarantined plague simulation in Minecraft Java where a toxic purple and lime infection spreads rapidly through a crowd of glowing villagers.

Java EditionMobs & PetsMedium24 commandsTested on a real 26.2 & 26.3 server
Infected villagers with purple glowing outlines wander inside a fenced arena filled with toxic purple and green particles. Download the GIF Video & GIF © www.9minecraft.net

Mob TransformationsHorrorDarkTechnologyPurpleGreenLearningCinematicMap MakingBlock displaysSummoned mobsBlock building (fill/setblock/clone)Sounds21+ commands

This command creation sets up a quarantined observation arena where a crowd of healthy villagers wanders around a pulsing biohazard spire. When Patient Zero enters the enclosure, a contagious purple and lime plague rapidly spreads from mob to mob based on proximity, flipping their glowing outlines from green to dark purple.

Each newly infected villager emits clouds of toxic spores and can immediately pass the affliction to nearby neighbors, creating a visual chain reaction across the entire arena.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard objectives add c9_inf_time dummy
  3. /team add c9_healthy
  4. /team modify c9_healthy color green
  5. /team add c9_plague
  6. /team modify c9_plague color dark_purple
  7. /fill ~-10 ~ ~-10 ~10 ~2 ~10 minecraft:lime_stained_glass outline
  8. /fill ~-9 ~ ~-9 ~9 ~2 ~9 minecraft:air
  9. /summon minecraft:block_display ~-0.75 ~0.5 ~-0.75 {Tags:["c9_sim","c9_core"],Glowing:1b,glow_color_override:11141290,block_state:{Name:"minecraft:amethyst_cluster"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.5f,2.5f,1.5f],translation:[0f,0f,0f]}}
  10. /summon minecraft:husk ~ ~ ~ {Tags:["c9_sim","c9_infected"],CustomName:{"text":"Patient Zero","color":"dark_purple"},CustomNameVisible:1b,Glowing:1b,PersistenceRequired:1b,Silent:1b,Team:"c9_plague",armor_items:[{},{},{},{id:"minecraft:creeper_head",count:1}]}

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

  1. /scoreboard players add #tick c9_timer 1
  2. /execute if score #tick c9_timer matches 1..28 run summon minecraft:villager ~ ~ ~ {Tags:["c9_sim","c9_healthy","c9_new"],Glowing:1b,PersistenceRequired:1b,Silent:1b,Team:"c9_healthy"}
  3. /execute as @e[tag=c9_new] run spreadplayers ~ ~ 2 8 false @s
  4. /tag @e[tag=c9_new] remove c9_new
  5. /execute at @e[tag=c9_core] run particle minecraft:witch ~0.75 ~1.2 ~0.75 0.5 1.0 0.5 0.05 5
  6. /execute at @e[tag=c9_healthy] run particle minecraft:happy_villager ~ ~1.2 ~ 0.25 0.3 0.25 0 1
  7. /execute at @e[tag=c9_infected] run particle minecraft:dust{color:[0.6,0.1,0.9],scale:1.6} ~ ~1.1 ~ 0.4 0.5 0.4 0 5
  8. /execute at @e[tag=c9_infected] run particle minecraft:dust{color:[0.2,1.0,0.2],scale:1.4} ~ ~1.1 ~ 0.4 0.5 0.4 0 3
  9. /execute at @e[tag=c9_infected] as @e[tag=c9_healthy,distance=..3.4] at @s run particle minecraft:angry_villager ~ ~1.5 ~ 0.3 0.3 0.3 0 8
  10. /execute at @e[tag=c9_infected] as @e[tag=c9_healthy,distance=..3.4] at @s run playsound minecraft:entity.zombie.infect master @a ~ ~ ~ 0.5 1.4
  11. /execute at @e[tag=c9_infected] as @e[tag=c9_healthy,distance=..3.4] run team join c9_plague @s
  12. /execute at @e[tag=c9_infected] as @e[tag=c9_healthy,distance=..3.4] run tag @s add c9_infected
  13. /execute as @e[tag=c9_infected,tag=c9_healthy] run tag @s remove c9_healthy
  14. /execute as @e[type=minecraft:villager,tag=c9_infected] at @s run scoreboard players add @s c9_inf_time 1

How it works

Frames from the test run

Contagious Plague Outbreak Simulation - frame 1Contagious Plague Outbreak Simulation - frame 2Contagious Plague Outbreak Simulation - frame 3

Recorded on our own test server: 57 frames at about 9.5 fps. Our image check saw: An enclosure contains a central crystal and many villagers outlined in purple, surrounded by dense purple and green spore particles.

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 in the center of a flat open area where you want the quarantine enclosure to appear.
  2. Run each of the 10 setup commands in chat one by one to build the glass walls, teams, biohazard spire, and Patient Zero.
  3. Place a repeating command block nearby set to Always Active, then chain 13 conditional or unconditional chain command blocks onto it.
  4. Paste the 14 loop commands in order into the repeating and chain command block line.
  5. Watch from above as the villagers spawn, scatter around the spire, and gradually catch the glowing purple plague.

Use it with real players

To include real players in the outbreak, join the healthy team with /team join c9_healthy @a, give yourself the healthy tag using /tag @a add c9_healthy, and turn on glowing with /effect give @a minecraft:glowing infinite 0 true so the proximity detector can infect you when you get too close to a carrier.

Remove it again 6 commands

  1. /kill @e[tag=c9_sim]
  2. /fill ~-10 ~ ~-10 ~10 ~2 ~10 minecraft:air
  3. /team remove c9_healthy
  4. /team remove c9_plague
  5. /scoreboard objectives remove c9_timer
  6. /scoreboard objectives remove c9_inf_time

FAQ

How do I reset the simulation after all villagers are infected?

Run /kill @e[type=minecraft:villager,tag=c9_sim] and then /scoreboard players set #tick c9_timer 0 to spawn a fresh batch of healthy villagers.

Can I change how fast the plague spreads across the arena?

Yes. Increase or decrease the distance=..3.4 value in loop commands 9 through 12 to change the infection radius around carriers.

Commands used

/execute/fill/particle/playsound/scoreboard/spreadplayers/summon/tag/team

Similar creations

Join 9Minecraft News & Guides