Allay

The allay is a small flying passive mob. It collects and delivers items for any player that gives it something, or any note block it hears recently playing.

Pillager outposts
Allays can be found surrounding pillager outposts, confined inside dark oak cages. One to three allays can spawn in each cage. They spawn here with a 50% chance.

Woodland mansion
Allays can also spawn inside jail cells within woodland mansions. One to three allays can spawn in each cell. They spawn here with a 50% chance.

Behavior
The allay's luminous texture allows it to be seen clearly in the dark, although it doesn't illuminate its surroundings.

The allay wanders around until a player gives it an item with their key. The allay starts following the player, seeking out dropped versions of the same item and delivering them to its player. The allay returns to wandering around if any player takes its item back by an empty hand on it.

The allay locks onto the player that last gave it an item. It follows the player from up to 64 blocks away even if it can't see them, and it seeks items up to 32 blocks away from the player. After delivering items, it has a delay of three seconds until it can seek items again. The allay has a single inventory slot to hold a stack of items (usually 64 items) in addition to the item it got from the player. While the allay does not discern enchantments, special item names, or items in Shulkers when it seeks, it still carries such items in separate trips.

Allays don't pick up any items if the Game rule if set to, but the player can still give the allay items with the  key.

If the allay hears a note block play within 16 blocks of its location, it tries to path find to the note block and then spends 30 seconds around that particular note block, seeking items around it and returning them to it instead of its player. After 30 seconds, the allay returns to targeting its player. A vibration particle emanates from the note block and reaches the allay to indicate the allay has locked on to the note block. Because the allay and the note block interact via a vibration particle, placing wool between the note block and the allay can prevent this interaction.

The allay can pick up items within a radius of about 1.3 blocks from itself and drop items up to 3 blocks away from its target (either the player or a note block).

When an allay hears a jukebox playing, it performs a dance animation. If the jukebox stops playing, or if the allay gets too far away from the jukebox, it stops dancing.

The allay cannot enter water, although it attempts to gather items that are under water.

Allays cannot be harmed by their owners. If they are harmed by another source, they go into a panic state and start moving wildly in random directions. When killed, allays drop the items they were holding. If an allay dies while holding a totem of undying, it instead returns to full health and the totem is destroyed, as with any mob holding a totem of undying. Allays naturally regenerate per second if damaged.

In Java Edition, a lead or a named name tag performs the item's normal function, instead of giving it to the allay.

Allay duplication
If the allay is given an amethyst shard while dancing, it plays a small amethyst sound, makes a heart, and duplicates into another allay. After duplication, both allays have a five minute cooldown before being able to duplicate again.

Teleportation
When a player teleports through a nether portal, the player's allay teleports also, even if it does not enter the portal.

When a player teleports through an end portal, the allay teleports to the End only if a player gives the allay an item before teleporting and must be nearby the player as they teleport.

Allays holding an item follow the player through a portal if they are 21 blocks horizontally to the player, or if they are within 22 blocks vertically of the player's legs. Allays do not travel through portals regardless of how close they are if they are tethered to a fence with a lead.

Sounds

 * Allays use the Friendly Creatures sound category for entity-dependent sound events.



ID




Entity data
Allays have entity data associated with them that contain various properties.




 * See Bedrock Edition level format/Entity format.
 * See Bedrock Edition level format/Entity format.

Trivia

 * The allay was originally planned for the Nether Update.
 * Some previous names considered for the allay were the wisp and the pixie.
 * The allays were created to solve the problem of how players would build structures and collect resources in Minecraft Legends while focusing on defending the overworld.
 * The reason why allay duplication uses amethyst shards is because the item is renewable, has a musical sound that fits with the allay, and it adds more value to amethyst geodes.
 * According to the "meet the allay" article on Minecraft.net, the reason why allays can be tamed by players is because they form a "magical connection" when that player gives it an item. This bond is what prevents players from accidentally harming their allay.
 * Originally, Mojang considered having allays naturally spawn within forest biomes. However, the reason they went with pillager outposts and woodland mansions, was because they wanted to highlight the companionship aspect.
 * Despite that they are flying mobs, allays can destroy turtle eggs when on top of them.