mojira.dev
MC-10657

Player entering nether portal while sneaking stuck in 'partial sneak'

The bug

If a player passes through a nether portal while in sneak mode, that player retains some properties of sneaking after coming out on the other side.

  • Cannot open chests, flip levers, etc.

  • Visually appears crouched to other players (including nameplate being hidden by opaque blocks)

  • Moves at full normal speed, despite appearing crouched

  • Falls off of block ledges, despite appearing crouched

  • Able to break and place blocks normally

Effect remains until player presses/releases sneak key.

Video of the behavior:
https://youtu.be/BUkyLzd0c1I


Code analysis by @unknown

Minecraft.setDimensionAndSpawnPlayer creates a new player entity, mostly losing the field values from the old one.
This causes the client to "forget" that the player was previously sneaking, and so it will not send a status update packet to the server as it believes that the sneak status is unchanged, causing the issue.

This issue can be fixed by changing setDimensionAndSpawnPlayer to copy the values used to determine when status update packets are sent (inside EntityPlayerSP.onUpdateWalkingPlayer) across to the newly-created player.

Linked issues

Comments 17

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.

No answer on querry, assuming no longer an issue.

1.8, this is an issue again: https://www.youtube.com/watch?v=wbSt5ntHgOI

Also verified locally by opening to LAN. Please re-open.

Confirmed for 1.8.1.
I'd like to mention this is more than just a graphical issue and you can get out of this glitch at any time by pressing the sneak button.

To my understanding the server keeps track of your sneaking state in order to show the animation to the other players online and, more importantly, decided what to do when you right click on an interactive block (i.e. place block against a crafting table or open its interface).
I believe this bug happens because during the world loading screen controls are frozen, which means the no-longer-sneaking notification is never sent to the server, or something like that.

Here is a video showing not-graphical part of the issue: http://youtu.be/RudTOG2reic

Personal side note: it would be nice if this was key binding dependent, not sneak dependent.

Problem persists in 1.8.3, as described in my accidental duplicate issue MC-78912. My details from that issue (which should be closed and linked to this one as a duplicate):

If a player passes through a Nether Portal while in sneak mode, that player retains some properties of sneaking after coming out on the other side.

  • Cannot open chests, flip levers, etc.

  • Visually appears crouched to other players (including nameplate being hidden by opaque blocks)

  • Moves at full normal speed, despite appearing crouched

  • Falls off of block ledges, despite appearing crouched

  • Able to break and place blocks normally

Effect remains until player presses/releases sneak key.

Tested on a Realms Survival world in 1.8.3.

7 more comments

Couldn't reproduce for 1.13.1.

Can confirm for 1.14-pre2. With the change in sneaking, this now implies the player will be in auto-sneaking pose until the sneaking button is pressed again.

Steps to reproduce

  1. Go to a Nether portal while holding sneak button.

  2. Release the button once you are waiting on the loading terrain screen.

  3. You will be put on auto-sneak on the other side until you press sneak again.

Fixed in 1.14-pre5.

This issue is occurring for me again in 1.14.4.

Confirmed is an issue again in 1.14.4

Miles Brouillette

(Unassigned)

Confirmed

(Unassigned)

Snapshot 13w09c, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.3, Minecraft 1.8.4, ..., Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b

Minecraft 1.14.2

Retrieved