mojira.dev
MC-7424

Fall damage death messages don't show block player fall from correctly (ladders, vines, water)

The bug

Death messages, such as:

  • <player> fell off a ladder

  • <player> fell off some vines

  • <player> fell out of the water

don't show instead it is just <player> fell from a high place

How to reproduce

  1. Make a very tall tower on which one side has a ladder and the other side has vines

  2. Climb to the top of either side, and fall off, killing yourself

  3. Death message <player> fell from a high place displays

See also this reddit post: http://www.reddit.com/r/Minecraft/comments/2wpmer/help_me_die/

Code analysis

Code analysis by @unknown can be found in this comment

Related issues

Attachments

Comments

migrated
[media][media][media][media][media]
[Crispy] PokeCanada

Dinnerbone has confirmed that this is a bug. Note to Mods: Don't erase this until fixed.

kumasasa

Do we erase tickets ?

[Crispy] PokeCanada

Sorry. Worded that wrong. Don't close this ticket. 😛

Aaron Opell

edited the post

Nathan Adams

I don't recall confirming this is a bug. The "finished off" text is only for when you fell previously, "x fell from a high place and was finished off by y" and not just plain old "x was finished off by y", so that part is working as intended. As for /kill on vines/ladders, that's just a special case of how /kill works. Won't fix for this snapshot, we'll see for next.

Torabi

Probably a result of the changes Jeb had to make to fix MC-8647.

galaxy_2alex

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been deliviered.

Aaron Opell

Yes, it still seems to be an issue in the current Minecraft version. I have not seen death messages for "<player> fell off a ladder" and "<player> fell off some vines" as well as some others do not appear to display in the game. These are the death messages in the EN_US.lang file in the 1.8.jar:

death.fell.accident.ladder=%1$s fell off a ladder
death.fell.accident.vines=%1$s fell off some vines

kumasasa

Updated, thanks.

Étienne B.

Confirmed for 1.8.8

SunCat

Still in 1.10

NeunEinser

Please link this post in the description.
All names are based on MCP 9.30

Why this happens
This happens because the check being done in net.minecraft.util.CombatTracker.calculateFallSuffix() looks for the block the player occupies when he dies. Since you aren't at the ladder anymore when you die, the messages will never appear.

How to fix
I came up with a simple fix, although it isn't just one line. In order to fix this problem, you need a variable that keeps track of the climbable Block the Entity occupied before it started falling (in this case fallSuffixBlock).

Changes/additions I made to net.minecraft.util.CombatTracker

net.minecraft.util.CombatTracker

/*
 * keeps track of the block that the entity was climbing on.
 */
private Block fallSuffixBlock;

public void calculateFallSuffix()
{
	this.resetFallSuffix();

	if (this.fallSuffixBlock != null)
	{

		if (this.fallSuffixBlock == Blocks.LADDER)
		{
			this.fallSuffix = "ladder";
		}
		else if (this.fallSuffixBlock == Blocks.VINE)
		{
			this.fallSuffix = "vines";
		}
		else if (this.fallSuffixBlock == Blocks.WATER || this.fallSuffixBlock == Blocks.FLOWING_WATER)
		{
			this.fallSuffix = "water";
		}

		this.setFallSuffixBlock(null);
	}
}

public void setFallSuffixBlock(Block blockIn)
{
	this.fallSuffixBlock = blockIn;
}

Then I made a simple condition in net.minecraft.entity.EntityLivingBase.onUpdate() to keep it updated.

net.minecraft.entity.EntityLivingBase.onUpdate()

//... added at line 2237
if (this.isOnLadder()) //Also true if player is on vines, therefore need to check for actual Block.
{
	this.getCombatTracker().setFallSuffixBlock(this.worldObj.getBlockState(new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ)).getBlock());
}
else if (this.isInWater())
{
	this.getCombatTracker().setFallSuffixBlock(Blocks.WATER);
}
//reset fallSuffixBlock if entity is on solid ground again.
else if (this.onGround)
{
	this.getCombatTracker().setFallSuffixBlock(null);
}
//...
NeunEinser

Also can confirm for 1.10.2

NeunEinser

Can confirm for 16w32a.

NeunEinser

Can confirm for 1.11.2

marcono1234

Removed not existing death messages from description

NeunEinser

Can confirm for 17w43a/b

wobst.michael

@unknown ticket is yours now.

Makzevu

Can anyone confirm for 1.13?

insane96mcp

Can confirm for 1.13.1 ...

Afaik there were messages like

"<player> was doomed to fall by <mob>"

Nixinova

"<player> was doomed to fall by / walked into a cactus/drowned whilst fighting <mob>" only seems to appear when the time between the mob damage and death is very, very short, like if a zombie hits you into a cactus while you are on 2.5 hearts only then will that message display

Makzevu

Confirmed for 1.14 Pre-Release 4.

FaRo1

This video was uploaded on the 1st of February 2013 and recorded shortly before, on a server that was either on the latest version or even a pretty recent snapshot at that point: https://www.youtube.com/watch?v=YbuWmY0p6a4
It shows multiple death messages listed here, including "was knocked off a high place by <player>". So apparently the version that broke it came out in late 2012 or early 2013.

FaRo1

According to an unofficial, fan-made Mindcrack wiki, the server always used the latest snapshot since the end of 2012, so this video should have been recorded in 13w10b: https://youtu.be/L8HHrijSwRg?t=508

It shows one of these very descriptive death messages, even though an earlier version is listed here.

I just tested it in 1.6.2 and got "was doomed to fall by zombie". In 1.14.2-pre3 I get "fell from a high place". In 1.4.7 it's also "fell from a high place". I didn't try old snapshots, because they aren't in the launcher, so it's complicated to get them. Something is very strange about the versions marked in this report.

violine1101

This ticket only covers fall damage caused by falling off blocks, it does not cover being hit by mobs (or players) and then dying of fall damage. There's probably another ticket about those cases.

FaRo1

This video was uploaded on 2019-08-19, so it was recorded about 70 days after the release of 1.6.2 and before the next snapshot (13w36a), so Etho was very likely playing in 1.6.2: https://youtu.be/Etf9CJxvKeM?t=1296

He got the death message "<player> fell off a ladder", even though that is in the version list of this report. @unknown, do you still remember how you tested it back then? It was apparently wrong.

[Mod] ManosSef

@unknown In this video (https://www.youtube.com/watch?v=YbuWmY0p6a4) which you commented above, Etho played in 13w04a. In 13w02a-13w04a, falling death messages worked in an interesting way:

There were two types of messages, " [player] 'first' " and " [player] 'first' and 'last' ".

<first> could be:

  • fell [off a ladder/off some vines/out of the water/fell from a high place]

  • was [shot/pummeled/blown/fireballed/knocked] [off a ladder/off some vines/out of the water/from a high place]

  • was [shot/pummeled/blown/fireballed/knocked] [off a ladder/off some vines/out of the water/from a high place] by [player/mob]

<last> could be:

  • into a pool of lava

  • fell out of the world

  • into a patch of fire

  • into a patch of cacti

  • got finished off by [player/mob]

  • got finished off by [player/mob] using [item]

  • got finished off using [item]

I've done the math. There were 352 different death messages.

(Well, technically there were 416 because the verb "blown" existed twice in en_US.lang.)

Aaron Opell

NeunEinser

Felix Jones

Confirmed

(Unassigned)

death, fall-damage, ladders, messages, vines, water

Snapshot 13w02b, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.6.2, Minecraft 1.7.4, ..., Minecraft 19w03c, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, 1.15.1

20w09a

Retrieved