Skip to content

Sneak desync on vehicle dismount. 1.21.1 client -> 1.21.4 server #1001

Description

@Leymooo

'/viaversion dump' Output

https://dump.viaversion.com/07cc962f75fb8ba1a872c90960210b2a35c95e06cf4825841657576ddc15d988

Server/Client Error

No response

Bug Description

When dismouting vehicle sneak desync happens. Server thinks player is sneaking, while client is not sneaking.

https://youtu.be/sifDeveoImo

Steps to Reproduce

  1. Log in with 1.21.1 client on 1.21.4 server
  2. Enter vehicle
  3. Press sneak to leave vehicle (press and release immediately).
  4. Sneak desync eventually should happen.

Code i use to debug.

  @EventHandler
  public void onSneakToggle(PlayerToggleSneakEvent event) {
    event.getPlayer().sendMessage("isSneaking: " + event.isSneaking());
  }

Normally what you should see when leaving vehicle:

isSneaking: true
isSneaking: false

What actually happens

isSneaking: true

isSneaking: false is missing
Pressing sneak again when desync happens cause:

isSneaking: true
isSneaking: true
isSneaking: false

Anticheats are not happy about this desync.

Notes: Looks like sneak desync only happens on low ping. When raising ping using clumpsy i am unable to trigger desync. My normal ping to test server is ~50.

Expected Behavior

No sneak desync.

Additional Server Info

No response

Checklist

  • Via plugins are only running on EITHER the backend servers (e.g. Paper) OR the proxy (e.g. Velocity), not on both.
  • I have included a ViaVersion dump.
  • If applicable, I have included a paste (not a screenshot) of the error.
  • I have tried a build from https://ci.viaversion.com/ and the issue still persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions