Raid

A raid is an in-game event in which waves of various mobs, mainly illagers, spawn and attack a village. It is triggered when a player with the Bad Omen status effect enters a village.

Spawning
A player with the Bad Omen status effect triggers a raid upon entering a chunk with at least one villager and a claimed bed, or one of the 8 chunks surrounding it in a square. $$, a villager with a claimed bell or job site block can also trigger a raid, even if no claimed beds are present.

Bad Omen is obtained when a player kills an illager captain, which can be found at pillager outposts, woodland mansions or in patrols. If a player kills multiple captains $$, the Bad Omen accumulates up to Bad Omen V, causing members of the raiding party to have an increased chance of having enchanted weapons. Killing a patrol captain gives 1–5 Bad Omen levels, while killing an outpost captain always gives 1 level. $$, the Bad Omen effect does not stack by killing multiple captains.

Raids can be triggered in the Overworld and End, but $$, raids cannot be triggered in the Nether.

Starting
$$, when a player with Bad Omen effect enters a 3×3×3 subchunk region around a village center, the effect disappears and the raid starts. A bossbar labeled "Raid" appears and begins charging. The bossbar is visible to players up to 96 blocks away (spherical) from the raid center. The bar is red and represents the total remaining health of the raid mobs. The number of mobs still alive displays when there are fewer than three. A horn sounds at the start of each wave, from the direction of the wave spawn and 13 blocks away from the player. A villager rings the bell while the bossbar charges. Each subsequent wave is larger, with more mobs, including pillagers, witches, evokers, ravagers, and vindicators.

$$, when a player with Bad Omen enters a 64x23x64 region around a village center (technically 1.12 blocks below the center), the effect disappears and the raid starts. A bossbar labeled "Raid" appears and begins charging. The bossbar is visible in a 128×88×128 region around the village center (technically 1.12 blocks below the center). The bar is purple, and represents the number of remaining mobs. While a wither is already present in the village and a raid starts, the bar is red and black. It is not clear whether or not this is intentional. The number of mobs still alive displays when there are fewer than three. A horn sounds at the start of each wave, and plays again at intervals until the wave has been defeated, or the player has lost. The horn plays from the direction of one of the illagers, which can help you locate it. The bell rings while the bossbar charges. Each subsequent wave is larger, with more mobs, including pillagers, witches, evokers, ravagers, and vindicators.

Joining
$$, illagers and witches not spawned as part of the raid (e.g. from a patrol) may join the raid and be counted by the bossbar, provided they are within 96 blocks of the village center. Illusioners can also join the raid. Raid captains may also join and can trigger a new raid when killed far enough from the village.

$$, illagers cannot join raids. If a new raid is triggered after all beds are destroyed and then replaced, previously remaining illagers are not counted in the new raid bossbar.

Illager
Illagers have exclusive behavior during raids.

$$, vindicators in a raid take the initiative to open and close doors to search for villagers. They can sometimes break a wooden door in Normal or Hard difficulty if they cannot open the door normally. Evokers and illusioners gain 3X movement speed without any effect.

$$, a vindicator spawned in a raid gains the ability to break doors in Normal difficulty, but does not actively seek doors. They try to break the door only when passing by.

Captains
When a wave captain is killed. other illagers in the raid try to pick up the banner dropped by the previous leader; the illager that retrieves the banner becomes the new wave captain.

A player does not receive the Bad Omen effect when killing the patrol captain within a village. The captain is always a vindicator upon spawning, if possible.

Raid wave spawning
The raid spawns several waves of raider mobs. If a raid wave begins while an illager is somehow already present inside the village, the wave does not spawn at all and entirely fills up with however many existing illagers are there; When these illagers are defeated, the raid resumes as normal. $$, to find a valid spawn target location at the beginning of each raid wave, there are 3 spawn attempt phases with 20 attempts per phase. For each attempt, a random location is chosen a certain radius away from the raid center (64 blocks in the first phase, 32 in the second, and 0 in the third) at a random horizontal angle, with fractional results rounded down. Additionally, a random 0–4 is added to X and Z coordinates. $$, the exact spawning mechanics are unknown, but the raid can spawn in the 128x32x128 region around the village center. In effect, the three spawn attempt areas are two rings and a 5&times;5 square. The target height is always on top of the topmost non-air block. For spawn location to be valid, the block underneath must have a solid opaque top face or be snow.

Valid spawn blocks include full blocks, upside-down slabs/stairs, soul sand, and packed/blue ice, but not glass, leaves, light-emitting blocks, trapdoors, regular ice, bottom slabs, or carpet. $$ the raid can spawn on any block except leaves and scaffolding. Any light level is fine and player proximity does not matter. The location must be in an entity-ticking chunk. If the game is unable to find a spawn location, the raid ends. Once a valid location is found, the horn sounds and all raider mobs for that wave spawn there at once. They then spread out and move toward the village. Once all raiders are killed, there is a 15-second cooldown before the next wave. However, if the last raider happens to move outside a spherical radius of 112 blocks from raid center, or the entire wave spawns outside that radius (which can happen with large differences in Y-level), then the next wave spawns immediately. Raiders that are part of a raid do not despawn naturally and do not contribute to the mob cap, but resume despawning once the raid is over or they leave it.

Java Edition
The number of waves depends on difficulty: There are 3 waves in Easy difficulty, 5 in Normal, and 7 in Hard. In Hard, there is a chance of 1 additional pillager and/or vindicator spawning. If the player's Bad Omen level is II or higher, one additional wave spawns (e.g. 4 in Easy, 6 in Normal, and 8 in Hard) with the same strength as the final wave. Raiders have an increased chance of spawning with enchanted items with higher bad omen levels, a 10% chance starting at Bad Omen II and up to a 75% chance at Bad Omen V.

When triggered with Bad Omen I, illager weapons are unenchanted. Bad Omen levels II through V each increases the possibility of low-level enchantments. There is a 1/4 chance of spawning an additional pillager and a 1/4 chance of spawning an additional vindicator each wave.
 * Easy difficulty

There is a 1/2 chance of spawning an additional pillager per wave, 1/2 chance of spawning an additional vindicator on each wave, and a 1/2 chance of spawning an additional witch during waves 3 and 5. If there is an extra wave, the ravager in that wave is not ridden by a pillager, and there is a 50% chance of spawning a second ravager during that wave only.
 * Normal difficulty

There are two attempts to spawn an additional pillager with a 1/2 success rate, two attempts to spawn an additional vindicator with a 1/2 success rate, and a 1/2 to spawn an additional witch starting on wave 3, excluding wave 4. If there is an extra wave, there is a 1/2 chance of spawning another ravager ridden by a vindicator during that wave only.
 * Hard difficulty or Hardcore gamemode

Bedrock Edition
$$, the number of waves depends on difficulty, regardless of Bad Omen level without any additional waves. There are three waves in Easy difficulty, five in normal, and seven in hard. They spawn with enchanted weapons at level 5 on easy and at levels 5-19 in other difficulties. There are no attempts to spawn additional mobs in any difficulty.

Loot
All mobs in a raid drop their own regular loot.

The raid captain drops
 * Special Drops
 * 1 Ominous Banner

In Java Edition
Pillagers, vindicators, and evokers drop their regular loot.

In Bedrock Edition
In addition to regular loot, pillagers and vindicators can drop: Additionally, depending on difficulty, they have a 65% chance of dropping on easy and normal, while 80% chance of dropping on hard: Note:
 * 0-1
 * 0-1 ($10/39$ chance)
 * 2-3 ($20/78$ chance)
 * 4-5 ($5/39$ chance)
 * 1 ($10/78$ chance)
 * 1 ($2/39$ chance)
 * 1 ($4/78$ chance)
 * 1 ($2/39$ chance)
 * 1 ($4/78$ chance)
 * 1 ($5/78$ chance)
 * 1 ($5/78$ chance)
 * 1 ($5/78$ chance)
 * 1 ($5/78$ chance)
 * Iron equipment from raider drops has 50% chance of being enchanted with random enchantment(s) at a low-to-medium level.
 * Iron equipment from raider drops is always damaged.
 * Emerald is both a regular raid drop and an additional drop.
 * Only emerald drops are affected by looting enchantment, increased by 1% per looting level.

Don't worry about Bedrock Edition raid mobs dropping more loot. In Java Edition, villagers give the player extra loot (gifts) after the raid, while in Bedrock Edition, the illagers drop extra loot when killed.

Bad Omen
$5/78$, besides triggering a raid, the Bad Omen status effect's level of the triggering player also affects the raid mechanism. When the Bad Omen level is higher than one, an additional wave spawns with the same strength as the final wave. With a higher level of Bad Omen to a raid, the illagers in the raid have a higher chance of being equipped with enchanted weapons. When the raid ends in a victory, the players receive Hero of the Village effect at the same level as the Bad Omen level of the raid. Players can also drink milk to remove any level of the Bad Omen effect. In Bedrock Edition, Bad Omen does not affect the enchanted weapons.

Ending
If the attacked village no longer registers as a village (i.e. all villagers were killed or all claimed beds were destroyed), the raid ends, the Raid bar displays "Raid - Defeat", and all of the illagers celebrate: the evokers, pillagers and vindicators raise their hands, the pillagers jump up and downor raise their hands, and all of them emit "celebration sounds".

If all illagers are killed in the final wave, any player who has killed an illager in the raid receives the Hero of the Village effect, the villagers shoot off fireworks, and the Raid bar displays "Raid - Victory".

$5/78$ if the village being attacked by a raid no longer registers as a village (i.e. all villagers were killed or all claimed beds were destroyed), the raid ends, the Raid bar instantly disappears, and all of the illagers celebrate: the evokers, vindicators, and pillager raise their hands, and all of them (including witch and ravager) emit "celebration sounds".

Raids cannot end naturally if at least one baby villager remains, due to illagers being passive to baby villagers and destroy beds, except for the “Johnny” vindicator.

In some cases a raid ends after a set amount of time, if all left over raiders can not move.

Villagers
$5/78$ during a raid, villagers emit "sweat particles". At least one villager rushes to the village meeting point and rings the bell to alert other villagers to get inside their houses during the warmup of an upcoming raid wave.

After successfully defending a village from a raid, the villagers emerge from their houses and celebrate, by setting off firework rockets and cheering, although villagers do not have a celebrate sound unlike the illagers.

Iron golems do not panic during a raid, nor they celebrate or ring bells during a raid.

Gifts
Villagers give players gifts after the raid in Java Edition. Villagers throw items at the player that are related to their profession. After throwing a gift a villager has a cooldown between 30 seconds and 5 minutes and 30 seconds before they can throw another gift at the player. That means the more villagers the player has, the more gifts they receive.

Witches
$5/78$, witches participating in a raid often help other illagers by splashing a Potion of Regeneration or Healing. Witches do not attack villagers and do not throw harmful potions at them.

$5/78$, witches participating in a raid do not heal other illagers, but still attack the player and iron golems. Witches are passive toward villagers, but their harmful splash potions might hit a villager by accident.

Mobs not counted
Vexes summoned by evokers do not count as part of the raid. Killing them has no effect on the raiding bar, and the raid ends in victory even if there are vexes remaining.

Expiring
If a raid goes on for 48,000ticks (40 minutes in real time) the raiding bar disappears and a message appears saying "raid expired", although expired the still living illagers stay until killed.

Trivia

 * If the player leaves a village during a raid, obtains another level of Bad Omen, and returns to the village, then the effect is nullified and has no effect on the progressing raid.
 * The horn sound that blares at the start of each wave is created by a corkscrew didgeridoo.
 * A Ravager with vindicator rider (in .json code) is an unused mob $$.
 * Vexes are not counted as part of the raid despite being summoned by an Evoker. A raid can be completed with leftover vexes.
 * Playing a goat horn makes the same sound as when a raid wave begins.