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

Potion effects with amplifiers above 127 work weird

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Snapshot 13w10b
    • Windows 7
    • Confirmed

      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.

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

              Created:
              Updated:
              Resolved:
              CHK: