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

Potion effects with amplifiers above 127 work weird

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Snapshot 13w10b
    • Fix Version/s: None
    • Labels:
    • Environment:
      Windows 7
    • Confirmation Status:
      Confirmed

      Description

      Potion effects with amplifiers above 127 work weird in the new snapshot.
      How to replicate:
      1. Type in "/effect player_name 1 10 127". For 10 seconds you will be able to run super fast.
      2. Type in "/effect player_name 1 10 128". Notice that FOV gets lowered, and you will be unable to move for the duration (you can still move while not on ground).

      I checked this with few effects: speed, jump boost, regeneration and hunger. Effects when amplifier is 128:
      Speed: I was unable to move.
      Jump boost: I was unable to jump.
      Regeneration: Instead of regenerating health super fast, it worked as if level 1 effect
      Hunger: Same issue as regeneration.

      As amplifier is now capped at 255, I think they use bytes for effect amplifier. Vaues above 127 cause byte to owerflow, thus generating potion effects with negative amplifier values.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                domas321 Domantas
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: