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
is duplicated by 5
Comments 17
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.
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
Go to a Nether portal while holding sneak button.
Release the button once you are waiting on the loading terrain screen.
You will be put on auto-sneak on the other side until you press sneak again.
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.