-
Bug
-
Resolution: Duplicate
-
None
-
Minecraft 18w20c
-
None
-
Unconfirmed
The bug
I noticed that after reloading the world, my resistance 255 effect wasn't working, in fact, after i checked, its amplifier reset to 0.
Steps to reproduce
- Give yourself an effect which amplifier is greater than 127
- Reload the world
- Do /data get entity @s ActiveEffects
- Notice how the effect amplifier is 0
Possible cause
This might have to do something with how signed bytes work.
Because we're entering unsigned bytes (0->255) in the /effect command as the amplifier, but the amplifier tag itself is a signed byte (-128->127), the game writes a negative value to the amplifier.
So, 128 is -128, 200 is -56 and 255 is -1.
However, when the game checks the amplifier, and sees the negative amplifier, it treats it as 0.
- duplicates
-
MC-108704 Negative amplifier potion effects no longer working
- Resolved