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

Delayed sneak slowdown due to incorrect logic

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.20.1
    • Minecraft 1.20.1, Java 20, Debian 12
    • Plausible
    • Player

      In the current version of Minecraft, a bug has been discovered in the "LocalPlayer" aiTick function, leading to a delayed onset and ending of the player's slowdown effect. This issue stems from an error in the logic responsible for applying the player's slowdown.

      The problem arises because the value of the "input.shiftKeyDown" variable is first stored before it is updated. As a result, the previously stored value is used to apply the slowdown effect, causing a one-tick delay in both the onset and ending of the effect.

      This bug negatively impacts gameplay, as it results in a prolonged duration of the slowdown effect, leading to frustration and game imbalance, especially in situations that require quick reactions (fastbridge, pvp, ...).

      To reproduce the issue, follow these steps:

      1. Launch Minecraft.
      2. Move around.
      3. Press shift.

      Expected behavior: *The player should *immediately experience a slowdown upon activating sneaking, and the slowdown effect should promptly end upon deactivating sneaking.

      Current behavior: The player experiences a one-tick delay in the onset and ending of the slowdown effect when activating and deactivating sneaking.

      To address this issue, it is recommended to review and update the logic in the "LocalPlayer" aiTick function to ensure that the player's slowdown effect takes effect and ends as intended. Specifically, updating the value of "input.shiftKeyDown" before storing it will ensure the correct application of the player's slowdown.

      This bug significantly impacts the player experience and should be resolved promptly to ensure a smooth and enjoyable gameplay experience.

            Unassigned Unassigned
            OPNsense OPNsense
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: