The Bug:
Tools held by allays can drop damaged when the allays are killed.
Allays drop the item they hold when they are killed. However, when a player kills an allay, the tool it holds sometimes drops with random durability lost, even though the allay never used it.
Steps to Reproduce:
Obtain a netherite sword enchanted with looting by using the command provided below.
/give @s minecraft:netherite_sword[minecraft:enchantments={looting:100}]Summon an allay with 1 health holding an iron pickaxe by using the command provided below.
/summon minecraft:allay ~ ~1 ~ {Health:1f,equipment:{mainhand:{id:"minecraft:iron_pickaxe"}}}Kill the allay with the sword and observe if the dropped iron pickaxe has lost durability.
Observed Behavior:
Tools held by allays drop damaged when the allays are killed.
Expected Behavior:
Tools held by allays would keep their durability when the allays are killed.