[MC-11135] Potion effects with amplifiers above 127 work weird Created: 06/Mar/13 Updated: 08/Jul/20 Resolved: 23/Mar/13 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Snapshot 13w10b |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Domantas | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 2 |
| Labels: | effect, potion | ||
| Environment: |
Windows 7 |
||
| Issue Links: |
|
||||||||
| CHK: | |||||||||
| Confirmation Status: | Confirmed | ||||||||
| Description |
|
Potion effects with amplifiers above 127 work weird in the new snapshot. I checked this with few effects: speed, jump boost, regeneration and hunger. Effects when amplifier is 128: 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. |
| Comments |
| Comment by Niklas Wittl [ 08/Jul/20 ] |
|
I tested It with Healing and Damage potions |
| Comment by Squid Eevee [ 15/Oct/13 ] |
|
An example is /effect @p 8 [duration] 128 This makes the player unable to jump, but resistant to fall damage. |
| Comment by Jared Jeyaretnam [ 10/Jun/13 ] |
|
Since they are signed integers, I think the actual maximum value is 127. after this it overflows to -128. |
| Comment by Kumasasa [ 23/Mar/13 ] |
|
Duplicate of |
| Comment by Kumasasa [ 06/Mar/13 ] |
|
Confirmed. |