Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-268008

Sneak Desync between Client and Server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.4, 24w03b, 1.20.5 Pre-Release 3
    • None
    • Confirmed
    • Networking

      Expected behaviour

      Whenever the player model is sneaking, the is_sneaking predicate should return true, and the sneak_time scoreboard should go up.

      Observed behaviour

      In some scenarios, the predicate returns "false" even if the player sneaks. In particular, this happens when keeping shift held after dismounting an entity.

      This indicates a desync between client and server. The server sees you stand normally, while client-side you're crouching.

      Steps to reproduce

      1. Track sneaking time, using either (or both) of the following two options:
        • Set up a "sneak_time" scoreboard:
          /scoreboard objectives add sneaktime minecraft.custom:minecraft.sneak_time)

          and display it in the sidebar:

          /scoreboard objectives setdisplay sidebar sneaktime
        • Set up a datapack with an is_sneaking predicate, then place down a command block that checks for it
      2. Mount an entity (/ride or manually; easiest is a boat). Immediately dismount and keep holding the sneak button.
      3. Notice how the sneak_time scoreboard doesn't increment (or how the predicate doesn't return true)

            Unassigned Unassigned
            SilicatYT SilicatYT
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: