Zombified Piglins drop XP and rare drops if killed by anything while in angered state
The bug
If a piglin is in a hostile state due to another piglin being attacked by the player or any other mob, it will drop XP and rare drops upon death by any source (including mob damage, suffocation and /kill).
To reproduce
- Construct some iron golems. Spawn multiple zombified piglins. Wait for the golems to kill the piglins. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombified piglins in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Summon multiple piglins and a single Johnny vindicator. Killing the piglins with /kill @e[type=piglin,distance=..10] or suffocating them before their anger timer runs out (after 20-40 seconds) should cause them to drop XP, despite never having interacted with the player.
Analysis
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombified piglins), there is code that appears to be checking for whether the piglin is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombified piglin from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
Linked Issues
is duplicated by14
relates to4
- Fixed
Anomie X
- 61
- 47
- Confirmed
Normal
- Gameplay
- Mob behaviour
- zombified_piglin
14w21a - 1.21.4
14w21a 14w21b 14w25a 14w25b 14w27b 14w28a 14w29b 14w32a 14w32b 14w32c 14w32d 14w34b 1.8-pre1 1.8-pre2 1.8-pre3 1.8 1.8.1-pre2 1.8.1 1.8.2-pre1 1.8.2-pre2 1.8.2-pre3 1.8.2-pre4 1.8.2-pre5 1.8.2-pre6 1.8.2-pre7 1.8.2 1.8.3 1.8.4 15w32b 15w44b 15w45a 15w47a 15w49a 15w49b 15w50a 15w51b 16w02a 16w03a 16w04a 16w05a 16w05b 1.9-pre1 1.9-pre2 1.9-pre3 1.9-pre4 1.9 1.9.1-pre1 1.9.1-pre2 1.9.1-pre3 1.9.1 1.9.2 16w14a 1.9.4 16w20a 1.10.2 1.11 1.11.2 17w06a 1.12.2 18w16a 1.13-pre7 1.13-pre10 1.13 18w31a 1.13.1-pre1 1.13.1-pre2 1.13.1 1.13.2-pre1 1.13.2 19w04b 1.14-pre5 1.14.2 1.14.3-pre1 1.14.4 1.15.2 20w09a 20w13b 20w16a 20w21a 20w22a 1.16-pre3 1.16.1 1.16.2 1.16.4-pre2 1.16.4 20w49a 20w51a 21w05b 1.17-rc1 1.17-rc2 1.17 1.17.1-pre3 1.17.1 1.18-pre1 1.19-pre5 1.19 1.19.2 1.19.3 23w03a 1.20.1 23w33a 1.20.4 24w09a 1.21 1.21.4- 1.16-pre1 25w02a
Created Issue:
Zombie Pigmen drop experience when killed by non-player entities (e.g. iron golems)
As I understand it, hostile mobs aren't supposed to drop experience or rare drops and the like unless they were hit by a player or a tamed wolf within 5 seconds before death. However, in the latest snapshot, this is not true for Zombie Pigmen angered by an attack on another Zombie Pigman.
To reproduce:
Construct some iron golems. Spawn multiple zombie pigmen. Wait for the golems to kill the pigmen. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombie pigmen in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Analysis:
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombie pigmen), there is code that appears to be checking for whether the pigman is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombie pigman from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Zombie Pigmen drop experience when killed by non-player entities (e.g. iron golems)When killed by Iron Golems, Zombie Pigmen drop XP and rare drops
When killed byIron Golems, Zombie Pigmen drop XP and rare dropsWhen killed by any entity, Zombie Pigmen drop XP and rare drops
is duplicated by
When killedbyanyentity, Zombie Pigmen drop XP and rare dropsWhen killed in any fashion, Zombie Pigmen drop XP and rare drops
is duplicated by
When killedinanyfashion, Zombie Pigmen drop XP and rare dropsWhen marked as killed by any entity, Zombie Pigmen drop XP and rare drops
is duplicated by
is duplicated by
relates to
is duplicated by
As I understand it, hostile mobs aren't supposed to drop experience or rare drops and the like unless they were hit by a player or a tamed wolf within 5 seconds before death. However, in the latest snapshot, this is not true for Zombie Pigmen angered by an attack on another Zombie Pigman.
To reproduce:
Construct some iron golems. Spawn multiple zombie pigmen. Wait for the golems to kill the pigmen. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombie pigmen in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Analysis:
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombie pigmen), there is code that appears to be checking for whether the pigman is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombie pigman from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Confirm for 1.9
As I understand it, hostile mobs aren't supposed to drop experience or rare drops and the like unless they were hit by a player or a tamed wolf within 5 seconds before death. However, in the latest snapshot, this is not true for Zombie Pigmen angered by an attack on another Zombie Pigman.
To reproduce:
Construct some iron golems. Spawn multiple zombie pigmen. Wait for the golems to kill the pigmen. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombie pigmen in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Analysis:
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombie pigmen), there is code that appears to be checking for whether the pigman is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombie pigman from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
As I understand it, hostile mobs aren't supposed to drop experience or rare drops and the like unless they were hit by a player or a tamed wolf within 5 seconds before death. However, in the latest snapshot, this is not true for Zombie Pigmen angered by an attack on another Zombie Pigman.
To reproduce:
Construct some iron golems. Spawn multiple zombie pigmen. Wait for the golems to kill the pigmen. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombie pigmen in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Analysis:
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombie pigmen), there is code that appears to be checking for whether the pigman is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombie pigman from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
When marked as killed by any entity, Zombie Pigmen drop XP and rare dropsZombie Pigmen drop XP and rare drops if killed by anything while in angered state
As I understand it, hostile mobs aren't supposed to drop experience or rare drops and the like unless they were hitbyaplayer or atamed wolf within 5 seconds before death. However, in the latest snapshot, this is not true for Zombie Pigmen angered by an attack on another Zombie Pigman.To reproduce:
Construct some iron golems. Spawn multiple zombie pigmen. Wait for the golems to kill the pigmen. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombie pigmen in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
Analysis:
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombie pigmen), there is code that appears to be checking for whether the pigman is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombie pigman from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
The bug
If a pigman is in a hostile state due to another pigman being attacked by the player or any other mob, it will drop XP and rare drops upon death by any source (including mob damage, suffocation and /kill).
To reproduce
- Construct some iron golems. Spawn multiple zombie pigmen. Wait for the golems to kill the pigmen. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombie pigmen in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Summon multiple pigman and a single Johnny vindicator. Killing the pigmen with kill @e[type=zombie_pigman,distance=..10] or suffocating them before their anger timer runs out (after 20-40 seconds) should cause them to drop XP, despite never having interacted with the player.
Analysis
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombie pigmen), there is code that appears to be checking for whether the pigman is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombie pigman from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
is duplicated by
is duplicated by
relates to
is duplicated by
Zombie Pigmen/Zombified Piglins drop XP and rare drops if killed by anything while in angered state
is duplicated by
is duplicated by
is duplicated by
blocks
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
relates to
is duplicated by
The bug
If a pig
man is in a hostile state due to another pigman being attacked by the player or any other mob, it will drop XP and rare drops upon death by any source (including mob damage, suffocation and /kill).To reproduce
- Construct some iron golems. Spawn multiple zombi
e pigmen. Wait for the golems to kill the pigmen. Experience orbs will be dropped, and maybe also rare drops if you're lucky.- Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombi
e pigmenin the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.- Summon multiple pig
manand a single Johnny vindicator. Killing the pigmenwith kill @e[type=zombie_pigman,distance=..10] or suffocating them before their anger timer runs out (after 20-40 seconds) should cause them to drop XP, despite never having interacted with the player.Analysis
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombi
e pigmen), there is code that appears to be checking for whether the pigman is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombi
epigman from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
The bug
If a piglin is in a hostile state due to another piglin being attacked by the player or any other mob, it will drop XP and rare drops upon death by any source (including mob damage, suffocation and /kill).
To reproduce
- Construct some iron golems. Spawn multiple zombified piglins. Wait for the golems to kill the piglins. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombified piglins in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Summon multiple piglins and a single Johnny vindicator. Killing the piglins with kill @e[type=piglin,distance=..10] or suffocating them before their anger timer runs out (after 20-40 seconds) should cause them to drop XP, despite never having interacted with the player.
Analysis
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombified piglins), there is code that appears to be checking for whether the piglin is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombified piglin from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
Zombie Pigmen/Zombified Piglins drop XP and rare drops if killed by anything while in angered state
The bug
If a piglin is in a hostile state due to another piglin being attacked by the player or any other mob, it will drop XP and rare drops upon death by any source (including mob damage, suffocation and /kill).
To reproduce
- Construct some iron golems. Spawn multiple zombified piglins. Wait for the golems to kill the piglins. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombified piglins in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Summon multiple piglins and a single Johnny vindicator. Killing the piglins with kill @e[type=piglin,distance=..10] or suffocating them before their anger timer runs out (after 20-40 seconds) should cause them to drop XP, despite never having interacted with the player.
Analysis
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombified piglins), there is code that appears to be checking for whether the piglin is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombified piglin from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in
this comment.The bug
If a piglin is in a hostile state due to another piglin being attacked by the player or any other mob, it will drop XP and rare drops upon death by any source (including mob damage, suffocation and /kill).
To reproduce
- Construct some iron golems. Spawn multiple zombified piglins. Wait for the golems to kill the piglins. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombified piglins in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Summon multiple piglins and a single Johnny vindicator. Killing the piglins with kill @e[type=piglin,distance=..10] or suffocating them before their anger timer runs out (after 20-40 seconds) should cause them to drop XP, despite never having interacted with the player.
Analysis
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombified piglins), there is code that appears to be checking for whether the piglin is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombified piglin from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
The bug
If a piglin is in a hostile state due to another piglin being attacked by the player or any other mob, it will drop XP and rare drops upon death by any source (including mob damage, suffocation and /kill).
To reproduce
- Construct some iron golems. Spawn multiple zombified piglins. Wait for the golems to kill the piglins. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Trap a skeleton where he can shoot at you but not escape. Spawn multiple zombified piglins in the line of fire. Experience orbs will be dropped, and maybe also rare drops if you're lucky.
- Summon multiple piglins and a single Johnny vindicator. Killing the piglins with /kill @e[type=piglin,distance=..10] or suffocating them before their anger timer runs out (after 20-40 seconds) should cause them to drop XP, despite never having interacted with the player.
Analysis
From a decompilation of 14w21b's class "abd" method bz() (which appears to be the "for each tick" AI handler for zombified piglins), there is code that appears to be checking for whether the piglin is angry and has the UUID of who he's angry at but no actual target, and if so it attempts to find the player corresponding to the UUID. And for some reason it also sets what appears to be the "damaged by player" counter (field "aM"), even if the UUID doesn't actually correspond to a player. And further, it appears to be setting the counter to the wrong value.
It appears that it'll also set the "damaged by player" counter incorrectly when loading the zombified piglin from NBT, although in this case I'd guess it'll probably be setting it to 0 so it shouldn't matter much.
Code analysis by Marcono1234 can be found in this comment.
is duplicated by
is duplicated by
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.
Dupe of MC-56653
Thanks for the report; however this is a duplicate of MC-56653.
Thank you for your report!
We're actually already tracking this issue in MC-56653, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
We're actually already tracking this issue in MC-56653, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
However, this issue is a Duplicate of MC-56653.
Please use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
We considered the XP dropping a bug, so if they did change it, it is intended, see MC-56653 for more details.
Works as intended, see MC-56653
(Please note that Mojang couldn't care less about breaking farms, sorry.)
As [Mod] violine1101 said, MC-187449 was re-opened, so I think the "Fix version" for this (MC-56653) should be 20w22a, as that was the last version to have the WAI way of XP dropping
We'll fix this for 1.16, but MC-56653 should still remain open as that will be fixed in a future version.
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-56653, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-56653, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-56653, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord
Thank you for your report!
We're tracking this issue in MC-56653, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Duplicate of MC-56653
Thank you for your report!
We're tracking this issue in MC-56653, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

Confirmed.
Note it's not just iron golems. I've personally tested skeletons, and I suspect any mob that you can get to attack the zombie pigmen would work.
confirmed 14w25b and 14w25a
For some reason, it only happens some times with me.
confirmed for 14w28a
confirmed for 14w29b
confirmed for 14w32d
The recent title edit by [Mod] Anon Ymus is incorrect. In particular, I created a 23x23 portal with trapdoors at Y=30 above a Superflat world in 14w32d, cranked up randomTickSpeed, and watched zombie pigmen walk off and die. None dropped experience or any rare drops.
The key is that a pigman must be damaged by a non-player entity; any passive pigmen within the anger distance will be marked as "damaged by the player" and will therefore drop XP on death.
Still exists in 14w34b.
You can do this by just hitting them with a snowball and getting them to drop as well. Very easy to reproduce. Here's a gyfcat:
http://gfycat.com/AffectionateActiveAurochs
and here's a youtube video:
https://www.youtube.com/watch?v=v8FFKvbhMdY
Getting hit by a snowball counts as player damage (even though it does 0 damage), so any death within 5 seconds counts as a player kill. Whether all the rest of the pigmen that get angered from hitting one with a snowball should also count as player kills is a good question, though.
Still present in 1.8-pre1.
Still present in 1.8-pre2.
Still present in 1.8-pre3.
Still present in 1.8. Boo.
It only seems to happen sometimes with Iron Golems.
Btw you don't need to confirm your own bug in the comments, that is for other people to do so the reporter/mods can update it.
Still present in 1.8.1-pre2.
It would be good to know if this AI change is intended or if it will be fixed.
Seems to be a bug and not an intended AI feature:
https://twitter.com/CyoorMC/status/529279433065390080
Confirmed for 1.8.1 (killed by wither skull).
Confirmed for 1.8.2-pre1 (by Iron Golem).
Still present in 1.8.2-pre3.
Still present in 1.8.3.
Confirmed for
I think this is releated to pigmen angering when attacked by any mob as the fix looks the same.
Still present in 15w45a.
I haven't tested it, but I suspect that since 15w43a the possibility of rare drops has been removed. They still drop XP as described here, though.
Confirm in 15w47a
Confirm for 15w50a
Confirmed for
Confirmed for 16w02a
Confirmed for 16w03a.
It's because the zombie pigman thinks, that the player attacked, it so that's why this will happen.
Confirmed for 16w04a.
Confirmed for 16w05a.
Confirmed 16w05b.
Confirm for 1.9-pre1
Confirm for 1.9-pre2
Confirm for 1.9-pre3
Confirm for 1.9-pre4
Please link to this comment in the description of the report.
The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.
I can confirm what the descriptions says. For whatever reason the net.minecraft.entity.monster.EntityPigZombie class is the only subclass of the net.minecraft.entity.EntityLivingBase class that modifies the protected int recentlyHit field. If the value of this field is greater than 0 or if a mob was killed by a player it drops rare items and xp on death.
The methods protected void updateAITasks() and public void readEntityFromNBT(NBTTagCompound tagCompund) of the net.minecraft.entity.monster.EntityPigZombie class both cause this problem because they only test if the UUID of the attacking entity is not null. If this is the case they set the attacking entity to a player with this UUID. As the UUIDs of other entities beside players can be stored the result of this.worldObj.getPlayerEntityByUUID(this.field_175459_bn) is null.
This creates a loop (every tick) for the protected void updateAITasks() method which constantly sets the attacking entity to null until the Anger value is 0.
Still in 1.9.1-pre3
Confirm for 16w14a
Confirm for 1.9.4
Confirm 16w20a.
Confirm 1.10.2
Wouldn't this be considered a case of W.A.I? I think the game checks for player kill responsibility based on last time the player attacked and whether any neutral mobs have been set to hostile in the area.
No, it even affects zombie pigman not touched by a player at all (and killed by Johnny).
Confirm for 1.11
I think it's fixed in 1.13-pre6, which makes me sad
How did you test it? It's still working for me (but don't tell Mojang..).
Still able to reproduce as well. Also it seems that any cause of death (not just mobs) cause XP drops as long as the pigman was aggravated at some point due to another pigman being attacked; e.g. summoning multiple pigman and a Johnny vindicator will cause the pigmen (except the one originally attacked) to drop XP when killed with /kill or suffocation.
Can confirm for 1.13-pre10.
Attached is the datapack I have used to reproduce this issue. The datapack contains a function that summons a pack of zombie pigmen riding a pufferfish. The pufferfish eventually dies and the zombie pigmen attack the player (
MC-69032). The zombie pigman have primed TNT on their heads which will eventually explode, leaving no drops but occasionally some experience orbs. Each time I reproduced I punched some of the pigmen before the TNT exploded.Can confirm for major release 1.13.
confirm for 18w31a
Can confirm for 1.13.1-pre2.
Can confirm for 1.13.1.
Confirmed for 1.13.2-pre1.
Confirmed for 19w04b.
Im relatively sure that this is a feature, and not a bug
Does not exist in minecraft 1.1 Java edition so was this introduced in 1.8 then?
can confirm for 20w16a
I'm no longer able to reproduce this in 1.16-pre1. In 20w22a, spawning a Johnny vindicator or snow golem next to zombified piglins and /kill'ing the piglins after they have killed the vindicator causes XP to be dropped. However in 1.16-pre1, I can no longer get them to drop XP through that method or the ones in the description, with any combination of the forgiveDeadPlayers or universalAnger gamerules.
Can confirm.
Based on
MC-187449, this is resolved, can anyone else confirm this?Yes. I can confirm.
Seems resolved in 1.16 pre2 too
Will this break entity cramming gold farms, or just when they are angered by mobs?
From what I have heard so far, it does break some XP and rare drop farms.
Does that mean that it doesn’t break some?
Here is a list of things ruined by this being fixed:
Honestly it's very shocking that this has not been marked as WAI or WF given that it has existed and been used since 2014. This also means that there will now be a very compelling reason to stay in 1.15.2 given that this is now fixed and
MC-183931is still broken. It makes near all nether based farms quite useless.In my opinion, one of the worst things that has ever happened to the tech community was 1.13 because then there was a split with tech servers where some wanted to use 1.12 and some wanted to be on latest. This was near fixed with 1.15 with major tech servers finally making plans to upgrade. But now with the state of the game, 1.15 will become the major tech version and the tech community will be split again.
In the end, this being fixed will only harm tech players and do literally nothing negative for casual players.
I'll try to keep this comment updated with anything else that will be ruined by this fix.
You can use furnaces to accumulate XP and just mass-collect it all at once. That's way more convenient for enchanting anyway.
For ice farms you can pretty easily mass-buy pickaxes from villagers. It's pretty easy to get one that sells you a pickaxe that's good enough for direct use in ice farms, no combining needed.
Mending is not ruined at all, there are tens of ways to get XP.
A bug being in the game for long or being abused a lot does not make it a feature.
Please keep all further discussions about this report on the bug tracker subreddit.
Since we're not sure whether this was fixed on purpose or on accident, we have reopened
MC-187449which is about this bug having been fixed.Edit: Seems like this was fixed on accident, see https://twitter.com/ThatZepheron/status/1269259361706283008
As per https://twitter.com/slicedlime/status/1269259752313442307
As [Mod] violine1101 said,
MC-187449was re-opened, so I think the "Fix version" for this (MC-56653) should be 20w22a, as that was the last version to have the WAI way of XP droppingKEN_2000: I have removed your comment for the reason that this is a bug tracker, not a discussion page. Please either head to the Mojira Subreddit, or the Mojira Discord.
FYI Discussion thread for this issue is at https://www.reddit.com/user/sliced_lime/comments/gzpo5p/some_words_on_things_in_116/
affects 1.16.2, please update.
Can confirm in 21w05b.
Can confirm in 1.17 Release Candidate 1, they drop XP when killed by the wither in an angered state (discovered by testing MC-162633).
Can confirm in 1.17 Release Candidate 2.
Can confirm in 1.17.1 Pre-release 3.
Can confirm in 1.17.1.
I think it can be avoided by using main entity IDs (like 6e03b567-5460-4229-bc4b-72c53c7e6fbf) instead of UUIDs (like [I; 1430853744, 2053259869, -1963946807, 1023847181]).
Can confirm in 1.18 Pre-release 1.
Can confirm in 1.19.
I thought that 1.19 was supposed to fix this, but it still happens in 1.19.2 (I am using entity cramming to kill).
Can confirm in 1.19.3
Can confirm in 23w03a. Added an image to clearly demonstrate the issue.
Can confirm in 1.20.1 (but for some reason this bug don't work in paper servers)
Can confirm in 1.21.
Can confirm in 1.21.4.
I think they should drop the gold but not the XP as XP is only dropped upon killed by player or tamed wolf.