Certain mobs have a odd chance of dropping experience when killed by a golem. Zombie Pigmen are an example.
I think it has to do with if the player is holding a weapon.
I am providing a screenshot showing which zombie pigmen dropped XP.
I also noticed the XP was dropped by the only one that died of falling caused by the zombie being flipped.I am unsure if this caused it, but I hit 1 of the pigmen, and that may caused it.
I tried it with zombies because zombies and Pig Zombies share a lot of AI and that doesn't seem to trigger it, so none from zombies
Duplicate of MC-56653 – If you searched the tracker before creating this report, and were unable to find the indicated ticket, please comment with the keywords you searched for so that the original report can be improved.