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.
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.
/scoreboard objectives add c9_timer dummy/scoreboard players set #tick c9_timer 0/fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 crying_obsidian/setblock ~ ~ ~ amethyst_cluster/summon marker ~ ~ ~ {Tags:["c9_center"]}/scoreboard players add #tick c9_timer 1/execute if score #tick c9_timer matches 1 run summon allay ~2 ~1.5 ~ {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}/execute if score #tick c9_timer matches 1 run summon allay ~-2 ~1.5 ~ {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}/execute if score #tick c9_timer matches 1 run summon allay ~ ~1.5 ~2 {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}/execute if score #tick c9_timer matches 1 run summon allay ~ ~1.5 ~-2 {NoAI:1b,Glowing:1b,Tags:["c9_mob","c9_allay"]}/execute as @e[tag=c9_mob] at @s facing entity @e[tag=c9_center,limit=1] feet run tp @s ^0.18 ^ ^ ~5 ~/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/execute if score #tick c9_timer matches 60 at @e[tag=c9_center] run summon lightning_bolt ~ ~ ~/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}}}/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/execute at @e[type=lightning_bolt] at @e[tag=c9_allay,distance=..6] run tp @s ~ ~-200 ~/execute at @e[tag=c9_vex] run particle soul_fire_flame ~ ~0.4 ~ 0.2 0.2 0.2 0.01 2/execute if score #tick c9_timer matches 135.. at @e[tag=c9_mob] run tp @s ~ ~-200 ~/execute if score #tick c9_timer matches 140.. run scoreboard players set #tick c9_timer 0loop #6 Makes both the Allays and the Vexes smoothly orbit the central marker by facing it and stepping slightly to the side each tick.loop #9 Checks for any Allay within 6 blocks of a lightning bolt and summons a glowing, sword-wielding Vex at its exact position.loop #10 Spawns a burst of large smoke particles around each struck Allay right as the transformation occurs.loop #11 Teleports the struck Allays deep into the void so they disappear immediately without playing a death animation or dropping items.


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.
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.
/tp @e[tag=c9_mob] ~ ~-200 ~/kill @e[tag=c9_center]/scoreboard objectives remove c9_timer/fill ~-1 ~-1 ~-1 ~1 ~ ~1 air/fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 grass_blockUsing /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.
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.
▶Thunderous Corruption: Allay to Vex MutationMob TransformationsEasy22 cmds
▶Matryoshka Elemental Golem UnfoldingMob TransformationsHard24 cmds
▶Body-Stealing Arena StalkerMob TransformationsHard21 cmds
▶Outbreak of the Creeping BlightMob TransformationsHard24 cmds
▶Towering Behemoth Awakening SequenceMob TransformationsMedium21 cmds
▶Subterranean Geode Pangolin RolloutMob TransformationsHard23 cmds