-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Describe the bug
Attempting to add too many levels to the knowledge tablet will cause the stored XP value to be negative. As negative XP can not be retrieved this will also void all XP.
Edit: This may also introduce a crash, see https://gnomebot.dev/paste/mclogs/oFfdXS5 for the crash log.
To Reproduce
Add 21864 levels to the knowledge tablet (Stored XP: -2147362744).
This was done both by adding 21864 levels at once and adding additional levels after adding 21863 (Stored XP: 214740793) levels worth of XP.
Edit: Crash occurs at some point while holding a knowledge tablet with a negative stored XP value. Does not occur immediately and may take a few minutes.
Expected behavior
Knowledge Tablet to either prevent adding further XP beyond 21863 levels worth or voiding excess XP.
System (please complete the following information):
- Occultism Version: 1.203.0
- OS: Windows 11
- Minecraft Version: 1.21.1
- Modpack Link and Version, or list of mods: Enigmatica 10 1.28.0
Additional context
Dictionary of Spirits notes that "with big values, you can lost a small quantity of point due numerical approximations." However, I doubt 21864 levels is considered small.
Also recommended wording changes for that note:
lost => lose
point => points
due => due to
There are values above 21863 levels of XP that do not result in negative XP (e.g. 31863).