mojira.dev
MC-159496

Player death uses incorrect sound event

I attempted to create a resource pack that uses sounds.json to add a custom death sound separate from the hurt sounds, and I noticed that upon death the sound event entity.player.hurt is used instead of the (normally identical) entity.player.death.

What I expected to happen was...

Upon dying (e.g. using the /kill command), the custom sound effect from the resource pack is played, and the subtitle "Player dies" appears with subtitles turned on.

What actually happened was...

The default hurt sound effect plays instead, and the subtitle reading "Player hurts" appears.

When sounds.json is modified again to change entity.player.hurt instead, the reverse happens.

Steps to reproduce

  1. Create a resource pack that modifies sounds.json such that the sound events entity.player.hurt and entity.player.death play different sound effects, and/or turn subtitles on through the sound or accessibility menus.

  2. Play a world or join a server and die by a gradual source like combat or the wither effect.

  3. Notice that the same sound plays and the same subtitle appears upon death as while you were being hurt. The differences between the two sound events can be confirmed using the /playsound command.

Linked issues

Attachments

Comments 3

Can at least confirm with subtitles, could you attach the resource pack please?

based on what I read in MC-154642 it seems like the player death sound uses the entity.generic.death sound event in certain situations (seems like it depends on if it is yourself or some other person dying).

@tryashtar: I've attached a resource pack for you. It's not the same one I was working on, but it modifies both the hit and death sounds to better demonstrate this.

@dragonmaster95: I did think about whether that was the case, but further testing and the subtitles prove otherwise. The reporter for MC-154642 mentions that they couldn't find a way to trigger those events besides commands. That said, they did mention that entity.player.death is used for other players in multiplayer, but I haven't had the chance to test that out myself yet.

David Wilkinson

migrated

Confirmed

Low

Sound

sound

1.14.4

19w45a

Retrieved