mojira.dev
MC-130639

Fall distance is not updated on the last tick of the fall

The updateFallState does not add -y to the fall distance on the last tick of the block, when the player touches the ground, causing the fall distance to be slightly less than it actually is:

protected void updateFallState(double y, boolean onGroundIn, IBlockState state, BlockPos pos)
{
    if (onGroundIn)
    {
        if (this.fallDistance > 0.0F)
        {
            state.getBlock().onFallenUpon(this.world, pos, this, this.fallDistance);
        }

        this.fallDistance = 0.0F;
    }
    else if (y < 0.0D)
    {
        this.fallDistance = (float)((double)this.fallDistance - y);
    }
}

The "else if (y < 0.0D)" should instead be an if statement and moved to the start of the method.

Comments 4

The game has undergone some large changes since this report was created, does this still apply in the latest versions of the game (1.16.1/20w29a)?

This bug is still in 1.21

This report is currently missing crucial information. Please take a look at the other comments to find out what we are looking for.
If you added the required information and a moderator sees your comment, they will reopen and update the report. However, if you think your update to this report has been overlooked or you want to make sure that this report is reopened, you can contact the Mojira staff on Discord or Reddit.
-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

This bug does have a 4 block limit due to terminal velocity (78.4 bps). This means you would take 4 less damage from a fall then normal.

Runemoro

(Unassigned)

Unconfirmed

(Unassigned)

Minecraft 1.12.2, Minecraft 1.13, Minecraft 18w30a

Retrieved