mojira.dev
MC-90598

Sneaking while swimming or gliding changes eye height to outside the hitbox

When you press sneak while flying with the Elytra wings in F5 mode, the camera angle changes. This is due to the eye level changes (you can see this with hitboxes shown). The eye level changes to the sneaking height's eye level (one block up), above the hitbox of the model and the camera adjust to the eye level.

Linked issues

MC-90654 Incorrect eye placement with elytra when sneaking and flying Resolved MC-90822 A player with Elytra's camera position changes when sneaking while in midair Resolved MC-90891 Incorrect player position while gliding and sneaking Resolved MC-90959 Shifting while gliding changes hitbox Resolved MC-91365 Eye level changes when sneaking while using Elytras Resolved

Attachments

Comments 19

yes, the player's position in flight equipped with elytra is different from that snapshot. normally the position is lower.

Also, the following occurs in 1st person:
When not sneaking, the player will land when the camera is 1 block above the ground
When sneaking, the player will land when the camera is 2 blocks above the ground

This happens to me, I also use F3+B to show hitboxes.

Confirmed for 15w43a

Confirmed for 15w43c.

9 more comments

The following is based on a decompiled version of Minecraft 1.11 using MCP 9.35.

The reason for this is that the method net.minecraft.entity.player.EntityPlayer.getEyeHeight() returns 1.54F when the player is sneaking, whether the player is flying or not.

public float getEyeHeight() {
    float f = 1.62F;

    if (this.isPlayerSleeping()) {
        f = 0.2F;
    } else if (!this.isSneaking() && this.height != 1.65F) {
        if (this.isElytraFlying() || this.height == 0.6F) {
            f = 0.4F;
        }
    } else {
        f -= 0.08F;
    }

    return f;
}

Can confirm for MC 1.12.1.

Confirmed to be fixed in 1.13-pre7

Confirmed as well.

Marked as fixed for 1.13-pre9 because older versions aren't selectable anymore.

Andrei

Jens Bergensten

Confirmed

Minecraft 15w42a, Minecraft 15w43a, Minecraft 15w43b, Minecraft 15w43c, Minecraft 15w44b, ..., Minecraft 17w16b, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w16a

Minecraft 1.13-pre9

Retrieved