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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.14.2
    • Snapshot 13w09c, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.3, Minecraft 1.8.4, Minecraft 1.8.8, Minecraft 15w32c, Minecraft 15w36d, Minecraft 15w38b, Minecraft 15w45a, Minecraft 1.11.2, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b
    • None
    • Confirmed
    • (Unassigned)

      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 quadraxis

      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.

            Unassigned Unassigned
            dubbedcraft Miles Brouillette
            Votes:
            12 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: