The Bug
Maces are not seen as a better weapon by mobs, which is seen if they are already holding a weapon that does less attack damage than the mace. They will also downgrade their mace for a worse weapon.
How to Reproduce
Dig a hole that is two blocks deep, and then summon a zombie using the command below:
/summon minecraft:zombie ~ ~ ~ {CanPickUpLoot:1b,Invulnerable:1b}
Throw the zombie a wooden sword. Then throw it a mace.
❌ Note how the zombie does not substitute its wooden sword for a mace, despite the mace doing more damage.
Kill the existing zombie and summon a new one using the command above. Throw it a mace. Then throw the zombie a wooden sword.
❌ Note how the zombie prefers the wooden sword, and drops the mace for it.
Additional Notes
Related to MC-193176.
Linked issues
duplicates 1
Comments 3
@unknown It does seem to be the same issue. This can be resolved as a duplicate of MC-273450.
Would MC-273450 describe your issue?