Lightning-Struck Allay Corruption

Summon a bolt of lightning that strikes peaceful Allays and mutates them into glowing, sword-wielding Vexes in a burst of dark smoke and soul fire.

Java EditionMobs & PetsEasy19 commandsTested on a real 26.2 & 26.3 server
Glowing Allays and a Vex circle an amethyst shrine surrounded by blue flame particles at night. Download the GIF Video & GIF © www.9minecraft.net

Mob TransformationsLightningDarkMysticCyanPurpleBlueAdventure MapBoss FightCinematicSummoned mobsBlock building (fill/setblock/clone)Lightning boltsRotation math13-20 commands

In vanilla Minecraft, lightning transforms pigs into zombified piglins and villagers into witches, but Allays remain untouched. This command setup adds a dramatic corruption mechanic where a strike of lightning mutates a flock of peaceful Allays into hostile, sword-wielding Vexes.

The demonstration runs on an automated cycle: four Allays gather around a central amethyst shrine with musical notes and cyan particles, until a bolt of lightning crashes down and replaces them with glowing Vexes in a thick cloud of smoke and soul flames.

1. Setup - type these once 5 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard players set #tick c9_timer 0
  3. /fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 crying_obsidian
  4. /setblock ~ ~ ~ amethyst_cluster
  5. /summon marker ~ ~ ~ {Tags:["c9_center"]}

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 run summon allay ~2 ~1.5 ~ {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}
  3. /execute if score #tick c9_timer matches 1 run summon allay ~-2 ~1.5 ~ {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}
  4. /execute if score #tick c9_timer matches 1 run summon allay ~ ~1.5 ~2 {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}
  5. /execute if score #tick c9_timer matches 1 run summon allay ~ ~1.5 ~-2 {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}
  6. /execute as @e[tag=c9_mob] at @s facing entity @e[tag=c9_center,limit=1] feet run tp @s ^0.18 ^ ^ ~5 ~
  7. /execute at @e[tag=c9_allay] run particle dust{color:[0.2,0.9,1.0],scale:1.2} ~ ~0.4 ~ 0.2 0.2 0.2 0 2
  8. /execute if score #tick c9_timer matches 60 at @e[tag=c9_center] run summon lightning_bolt ~ ~ ~
  9. /execute at @e[type=lightning_bolt] at @e[tag=c9_allay,distance=..6] run summon vex ~ ~ ~ {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_vex"],equipment:{mainhand:{id:"minecraft:iron_sword",count:1}}}
  10. /execute at @e[type=lightning_bolt] at @e[tag=c9_allay,distance=..6] run particle large_smoke ~ ~0.5 ~ 0.3 0.3 0.3 0.05 25
  11. /execute at @e[type=lightning_bolt] at @e[tag=c9_allay,distance=..6] run tp @s ~ ~-200 ~
  12. /execute at @e[tag=c9_vex] run particle soul_fire_flame ~ ~0.4 ~ 0.2 0.2 0.2 0.01 2
  13. /execute if score #tick c9_timer matches 135.. at @e[tag=c9_mob] run tp @s ~ ~-200 ~
  14. /execute if score #tick c9_timer matches 140.. run scoreboard players set #tick c9_timer 0

How it works

Frames from the test run

Lightning-Struck Allay Corruption - frame 1Lightning-Struck Allay Corruption - frame 2Lightning-Struck Allay Corruption - frame 3

Recorded on our own test server: 59 frames at about 9.6 fps. Our image check saw: Four glowing Allays and a Vex circle around a crying obsidian and amethyst shrine with blue flame 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. Chat or paste the 5 setup commands to create the scoreboard timer, the amethyst shrine, and the center marker.
  2. Place a column or line of 14 Repeating Command Blocks set to Always Active.
  3. Paste each of the 14 loop commands into its own repeating command block in order.
  4. Watch the 4 Allays orbit the amethyst crystal until lightning strikes at 3 seconds and corrupts them into Vexes.
  5. When finished, run the remove commands to clean up all entities, blocks, and scoreboard objectives.

Use it with real players

To add this corruption mechanic to normal survival gameplay without the automated demo loop, you only need three repeating command blocks running commands 9, 10, and 11 from the loop list. Remove the tag=c9_allay filter and replace it with type=allay, and omit NoAI:1b from the Vex summon command so the newly mutated Vexes actively attack nearby players whenever natural or Channeling trident lightning hits an Allay.

Remove it again 5 commands

  1. /tp @e[tag=c9_mob] ~ ~-200 ~
  2. /kill @e[tag=c9_center]
  3. /scoreboard objectives remove c9_timer
  4. /fill ~-1 ~-1 ~-1 ~1 ~ ~1 air
  5. /fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 grass_block

FAQ

Why do the commands teleport the Allays to Y=-200 instead of using /kill?

Using /kill causes the Allay to turn red, fall over, and emit standard white death poof particles, which hides the Vex reveal. Teleporting them into the void makes the swap instant and seamless.

Can I change the weapon the corrupted Vexes hold?

Yes. In the Vex summon command, change minecraft:iron_sword inside the equipment mainhand component to any weapon you prefer, such as minecraft:netherite_sword or minecraft:diamond_axe.

Commands used

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

Similar creations

Join 9Minecraft News & Guides