Leaving the game with the Ring of Chordata's night vision active grants effectively infinite night vision
Hubry opened this issue ยท 1 comments
Version Information
Forge version: 14.23.5.2772
Botania version: r1.10-358
Further Information
Link to crash log: n/a
Steps to reproduce:
- Equip the Ring of Chordata, make sure you have mana
- Jump into water, make sure you got night vision from the ring
- Log off/leave the game/etc
- Rejoin the world/etc
What I expected to happen: Ring continues to grant night vision only when underwater
What happened instead: The night vision effect persists with effectively infinite duration even if the ring is taken off, and stays until you die/cure with milk/etc.
Suspected cause is that potion effects with negative strength are saved as effects with positive strength instead when serialized. Some possible solutions would be to either stop giving a negative level of the effect (which would probably break the intended way it works, as it would interrupt night vision from potions, etc), or give the effect with relatively low duration and make it refresh when it gets too low.
I would try to fix this myself but it's getting late and I'm lazy :V