mojira.dev
MC-149036

Mobs that have been hit with a snowball by a player don't count as killed by the player upon death

The bug

If you hit a mob with a snowball and then that mob dies of other causes (for example magma blocks, cacti, or fire), that death is not counted as a player kill. Therefore, the mob does neither drop its armor and gear, nor any experience points.

To reproduce

  1. Run

    /summon husk ~ ~ ~ {ArmorDropChances:[0.0f,0.0f,0.0f,1.0f],ArmorItems:[{},{},{},{id:"minecraft:iron_helmet",Count:1b}],HandDropChances:[1.0f,0.0f],HandItems:[{id:"minecraft:iron_sword",Count:1b},{}]}
  2. Kill the husk with a sword

  3. ✔ The husk always drops its helmet and sword

  4. Run that command again

  5. Hit the mob with a snowball

  6. Kill the husk with /kill, or let it die on magma blocks, through fire, or through other means

  7. ❌ The husk won't drop its gear, and no experience points

Original description

When a player does damage to a mob and it dies shortly after it would drop its loot. This is currently broken now (probably broken when they fixed the dog player-loot tables).

What use to happen:
Player hits zombie with snow ball
zombie dies on magma block shortly after
zombie drop xp, main loot, and chance of gear/tools it was holding

What does happen:
Player hits zombie with snow ball
zombie dies on magma block shortly after
zombie drop xp, main loot, and NEVER drops gear/tools

Linked issues

Comments 11

I've tested this a bit, and they never drop their gear unless they're killed by the player (aka, the last hit was made by the player). I've rewritten the ticket a bit to better reflect that.

Thanks for that, in the previous version it sounded like they complained that mobs didn't drop player-only drops anymore if they were killed shortly after being attacked. I wondered already what the bug there should be. Thanks for clearing that up, not dropping something with drop chance 100% is indeed a pretty clear bug.

I'll have to made a new bug report. This report has been change to describe something different which is not what the original report was about.

I don't quite understand, can you pinpoint to what exactly the difference between the behaviour you were describing and what I changed the report to is?

This report seems to explaining a mechanic that works as intended.

1 more comments

I made some changes to the report, if there's still some issues with it, please tell me.

Now it's WAI. If it dies by other means than player, it shoulnd't drop player-only drops.

It's been fixed. But it seems looting only applies if sword does last hit.

I still seem to be able to reproduce this issue though?

This bug has been fixed

Ray

(Unassigned)

Confirmed

Loot tables

gear, loot, snowball

Minecraft 1.14 Pre-Release 5, Minecraft 1.14, 1.15 Pre-release 6

1.15.2

Retrieved