mojira.dev
MC-165324

When the player dies, both the player hurt and death sound events play

When the player dies, both the hurt and death sound events play. This causes both the "Player hurts" and "Player dies" subtitles to show up, and sometimes makes it sound like the hurt sound is being played twice upon death.

Caused by the fix of MC-159496

To reproduce

  • Turn on subtitles, or use a resource pack to change entity.player.death to play a different sound.

  • Type /kill

Linked issues

Attachments

Comments 10

Isn't this the case for all other entities as well?

It isn't. Just players.

Made some changes to the report; the root issue seems to be that both the player hurt and death sound events are played when you are killed (causing subtitles of both to show up). In 20w16a I was still able to reproduce it with fire/drowning damage sounds as well.

A better fix for MC-159496 would be to create three new sound events that are identical to their entity.player.hurt counterparts:

  • entity.player.death_drown

  • entity.player.death_on_fire

  • entity.player.death_sweet_berry_bush

However, all of these sound events should have the same "Player dies" subtitle. When the player dies, the game should no longer trigger an entity.player.hurt sound event. Instead, one of the four death sound events including entity.player.death are triggered depending on the cause of death.

Definitely. And this is not the case for other mobs

Can confirm in 21w03a.

Can confirm in 21w06a.

Still happens, any fix?

Can confirm in 1.18.2 and 22w18a.

W_V

(Unassigned)

Confirmed

Sound

19w45b, 1.15 Pre-release 4, 1.15, 1.15.1, 1.15.1 Pre-release 1, ..., 1.17.1, 1.18.2, 22w18a, 1.19.4, 23w14a

Retrieved