mojira.dev
MC-159163

Quickly pressing the sneak key causes the sneak animation to play twice

If you quickly press the sneak key in a laggy world or a server, the sneak animation will often play twice.

I suspect this could be because the client and the server are in disagreement of the player's sneak state.

In my clips it isn't as severe, but many times I have had experiences that are much worse.

Video:

[media]

Linked issues

Attachments

Comments 24

Gabrijel

Affects 1.15.2

Gerrygames

The issue occurs when the player releases the sneak key before the first metadata update is received by the client.

This is what happens with low latency:
Sneak key pressed -> Player starts sneaking
Client receives metadata update with sneaking=true
Sneak key released -> Player stops sneaking
Client receives metadata update with sneaking=false

But with a latency higher than the time between pressing and releasing the sneak key:
Sneak key pressed -> Player starts sneaking
Sneak key released -> Player stops sneaking
Client receives metadata update with sneaking=true -> Player starts sneaking again
Client receives metadata update with sneaking=false -> Player stops sneaking again

It seems like the client isn't actually sneaking, only the point of view and player pose is changed.

Daniel Chýlek

Affects 1.16.2.

Abhik Aryan

It only happens with me on a server, can someone help me please? it double sneaks or bounce idk how! it happens with me in every version !

Daniel Chýlek

The same bug also affects sprinting, if I sprint on a server with bad ping it stops me from sprinting for a short moment and then restarts, or starts wobbling forever... it actually makes sprinting in 1.16 unusable... thinking about modding it out just to make the game playable again.

14 more comments
Dexrn

Can confirm in 1.21

[Mod] turbo

@unknown: Please stop uploading video footage taken in a modified environment and confirming the bug for an already added version.

Felix14_v2

@turbo sorry, but you deleted my first comment instantly without any explanation, so I just thought it was an upload bug and sent it again.

Blackilykat

Can confirm from 1.21 to 1.21.5

btw, here’s another fabric mod that fixes this. As of writing this it’s listed for more versions than sneakfix but I believe the code is pretty much the same https://modrinth.com/mod/no-double-sneak

Lightningbulb

Turns out Krypton also majorly helps with this bug. I only got an almost imperceptible desync once when I was really trying to get the sneak bug. https://modrinth.com/mod/krypton

Mike Mcgrath

(Unassigned)

Confirmed

Gameplay

Low

Player

1.14.4, 1.15.2, 1.16.1, 1.16.3, 1.16.4, ..., 1.20.4, 1.21.3, 24w45a, 1.21.4, 1.21.5

Retrieved