Dying entities can make splashing/falling sounds
The bug
Dying entities can still make splashing/falling sounds, as if they were still alive. This could be intended.
To reproduce
- Create a new creative world and fly a few blocks above water/land.
- Execute the following command:
/summon turtle ~ ~ ~ {Health:0}
Observed result
The mob makes sounds after dying.
Expected result
The mob would not make sounds after dying.
Code analysis
Using Mojang mappings (22w11a).
LivingEntity#causeFallDamage(...) does not check if the entity is alive in order to play the fall sounds:
...
@Override
public boolean causeFallDamage(float $$0, float $$1, DamageSource $$2) {
boolean $$3 = super.causeFallDamage($$0, $$1, $$2);
int $$4 = this.calculateFallDamage($$0, $$1);
if ($$4 > 0) {
this.playSound(this.getFallDamageSound($$4), 1.0f, 1.0f);
this.playBlockFallSound();
this.hurt($$2, (float)$$4);
return true;
}
return $$3;
}
...
A potential fix would be to replace if ($$4 > 0) with if ($$4 > 0 && this.isAlive()).
Created Issue:
Dying mobs can make splashing/falling sounds
Dying mobs can still make splashing/falling sounds, as if they were still alive.
Dying mobs can still make splashing/falling sounds, as if they were still alive. This could be intended.
Dying mobs can still make splashing/fallingsounds,as if they were still alive. This could be intended.The bug
Dying mobs can still make splashing/falling sounds, as if they were still alive. This could be intended.
To reproduce
- Create a new creative world and fly a few blocks above water/land.
- Execute the following command:
/summon turtle ~ ~ ~ {Health:0}Observed result
The mob makes sounds after dying.
Expected result
The mob would not make sounds after dying.
relates to
Dyingmobs can make splashing/falling soundsDying entities can make splashing/falling sounds
The bug
Dying
mobs can still make splashing/falling sounds, as if they were still alive. This could be intended.To reproduce
- Create a new creative world and fly a few blocks above water/land.
- Execute the following command:
/summon turtle ~ ~ ~ {Health:0}Observed result
The mob makes sounds after dying.
Expected result
The mob would not make sounds after dying.
The bug
Dying entities can still make splashing/falling sounds, as if they were still alive. This could be intended.
To reproduce
- Create a new creative world and fly a few blocks above water/land.
- Execute the following command:
/summon turtle ~ ~ ~ {Health:0}Observed result
The mob makes sounds after dying.
Expected result
The mob would not make sounds after dying.
The bug
Dying entities can still make splashing/falling sounds, as if they were still alive. This could be intended.
To reproduce
- Create a new creative world and fly a few blocks above water/land.
- Execute the following command:
/summon turtle ~ ~ ~ {Health:0}Observed result
The mob makes sounds after dying.
Expected result
The mob would not make sounds after dying.
Code analysis (tentative)
Using Mojang mappings (22w11a).
LivingEntity#causeFallDamage(...) does not check if the entity is alive in order to play the fall sounds:... @Override public boolean causeFallDamage(float $$0, float $$1, DamageSource $$2) { boolean $$3 = super.causeFallDamage($$0, $$1, $$2); int $$4 = this.calculateFallDamage($$0, $$1); if ($$4 > 0) { this.playSound(this.getFallDamageSound($$4), 1.0f, 1.0f); this.playBlockFallSound(); this.hurt($$2, (float)$$4); return true; } return $$3; } ...A potential fix would be to replace if ($$4 > 0) with if ($$4 > 0 && this.isAlive()).
The bug
Dying entities can still make splashing/falling sounds, as if they were still alive. This could be intended.
To reproduce
- Create a new creative world and fly a few blocks above water/land.
- Execute the following command:
/summon turtle ~ ~ ~ {Health:0}Observed result
The mob makes sounds after dying.
Expected result
The mob would not make sounds after dying.
Code analysis
(tentative)Using Mojang mappings (22w11a).
LivingEntity#causeFallDamage(...) does not check if the entity is alive in order to play the fall sounds:... @Override public boolean causeFallDamage(float $$0, float $$1, DamageSource $$2) { boolean $$3 = super.causeFallDamage($$0, $$1, $$2); int $$4 = this.calculateFallDamage($$0, $$1); if ($$4 > 0) { this.playSound(this.getFallDamageSound($$4), 1.0f, 1.0f); this.playBlockFallSound(); this.hurt($$2, (float)$$4); return true; } return $$3; } ...A potential fix would be to replace if ($$4 > 0) with if ($$4 > 0 && this.isAlive()).
relates to
relates to

Very likely related to
MC-1246.Can confirm in 1.19.
Can confirm in 23w03a.