The Bug
Some mobs that are able to melee and are given an item (by setting their NBT tag 'CanPickUpLoot' to true) that is enchanted with Fire Aspect do not set their target on fire when they attack with said item. While these mobs do not have the ability to pick up items in survival, others mobs which normally can't pick up items nor render the item being held (such as Spiders, Silverfish, Endermen, etc.) the Fire Aspect enchantment works as expected.
Affected Mobs
Bee
Cat
Dolphin (Always drop item it 'holds' anyway)
Goat
Hoglin
Iron Golem
Magma Cube
Ocelot
Polar Bear
Rabbit (The Killer Bunny)
Slime
Wolf
Zoglin
Steps to Reproduce
Summon any of the affected entites listed above, who are holding a sword enchanted with fire aspect, for example, a zoglin.
/summon minecraft:zoglin ~ ~ ~ {HandItems:[{Count:1b,id:"minecraft:wooden_sword",tag:{Enchantments:[{id:fire_aspect,lvl:1}]}}]}
Double-check to see whether or not the zoglin is holding a sword enchanted with fire aspect.
/data get entity @e[type=minecraft:zoglin,limit=1,sort=nearest] HandItems
Summon a pig nearby so that the zoglin will attack it.
As the zoglin attacks the pig, take note as to whether or not the pig is ignited.
Observed Behavior
Several entities that have melee attacks can't use the fire aspect enchantment.
Expected Behavior
Several entities that have melee attacks would be able to use the fire aspect enchantment.
Attachments
Comments 7
You can test the cat by spawning a rabbit for it to attack, and for the ocelot you can spawn a chicken. The dolphin really can't even be tested, but I thought I would include it anyway from my findings.
Can confirm this behavior in 21w42a. Here are some extra details regarding this problem.
The Bug:
Several entities that have melee attacks can't use the fire aspect enchantment.
Steps to Reproduce:
Summon any of the affected entites listed above, who are holding a sword enchanted with fire aspect, for example, a zoglin.
/summon minecraft:zoglin ~ ~ ~ {HandItems:[{Count:1b,id:"minecraft:wooden_sword",tag:{Enchantments:[{id:fire_aspect,lvl:1}]}}]}
Double-check to see whether or not the zoglin is holding a sword enchanted with fire aspect.
/data get entity @e[type=minecraft:zoglin,limit=1,sort=nearest] HandItems
Summon a pig nearby so that the zoglin will attack it.
As the zoglin attacks the pig, take note as to whether or not the pig is ignited.
Observed Behavior:
Several entities that have melee attacks can't use the fire aspect enchantment.
Expected Behavior:
Several entities that have melee attacks would be able to use the fire aspect enchantment.
Can confirm, was able to test all except cat, dolphin, and ocelot, none of the mobs trigger the player to burn as they should