When a villager falls from a high place, the death message logged is "Villager hit the ground too hard", maybe followed by "whilst trying to escape <player/mob>" if someone knocks him from a high place. This is the case even for climbable blocks. Named mob deaths which are now logged in 1.17.1 Pre-release 2 use "fell from a high place", "fell off a ladder" and so on.
How to reproduce:
In the launcher, go to the settings and enable "Open output log when Minecraft: Java Edition starts".
Launch any version above release 1.15.
Enter a singleplayer world.
Punch a villager off a platform 25 blocks high up in the air.
Look at the log.
Expected result:
The villager's death message would contain the cause of its fall damage ("fell from a high place" or "fell off a ladder" or others like these).
Observed result:
The villager's death message was either "hit the ground too hard" or "hit the ground too hard whilst trying to escape <player/mob>".
Cause:
When a villager dies, Villager#die is run for that villager. That method is shown below.
public void die(DamageSource damageSource) {
LOGGER.info("Villager {} died, message: '{}'", this, damageSource.getLocalizedDeathMessage(this).getString());
Entity entity = damageSource.getEntity();
if (entity != null) {
this.tellWitnessesThatIWasMurdered(entity);
}
this.releaseAllPois();
super.die(damageSource);
}At the start of the method, a message with two arguments (pairs of curly braces) is printed to the console. The first argument is replaced by Villager#toString, while the second argument is replaced by damageSource.getLocalizedDeathMessage(this).getString(). This doesn't allow for the villager's CombatTracker to check for climbable blocks, and thus death messages for climbable blocks cannot appear. Named entities use this.getCombatTracker().getDeathMessage().getString() for the second argument instead, and this is what should be used for villagers as well.
Linked issues
is duplicated by 1
Attachments
Comments 5
This isΒ probably caused by the villager defaulting to tellWitnessesThatIWasMurdered automatically to tell other villagers in the area to increase prices. Again, this is just speculation, but this is probably not a bug.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support (Technical Issues) β π§ Microsoft Support (Account Issues)
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki
Can confirm.