Mojira Archive
MC-44560

When pushed to water or lava edge, entities jump by themselves

In a new Survival map on the latest snapshot (14w02c), when reached the edge of a flowing water stream, my character jumped up a block without any user interaction.

I attached a short clip of this behavior. I never pressed the jump key in this video, the only keys I used were the WASD to move to the sides. Notice that once I'm pushed by the water to a block and mine that block, I jump up.

This affects all entities that extend EntityLivingBase, most notably players and armor stands.

Code analysis

Based on 1.11 decompiled using MCP 9.35 rc1

Method: net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(float, float)
Code piece:

if (this.isCollidedHorizontally && this.isOffsetPositionInLiquid(this.motionX, this.motionY + 0.6000000238418579D - this.posY + d0, this.motionZ))
{
    this.motionY = 0.30000001192092896D;
}

Looks intended as it explicitly does this.