You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sortilege saves XP stats of a living entity to a static map XPHelper.XP_STATS. While this is fine, this map is never persistently saved. So if die, click on "Title Screen", then close the game (or crash), when you reload the world the ModEvents.xpRefill event listener fails with a null pointer, since the XP stat it's trying to get doesn't exist for the UUID you saved it for.
The 1.19.2 version is written in Forge, so this can easily be solved by making a LivingEntity capability and attaching XP stats to it (this can even work with Players, but you'd need to watch out for this issue: MinecraftForge/MinecraftForge#9311). Even though the 1.20.1 version is written in Fabric, I'm sure there is some sort of similar solution to persistently save XP stats.
In any case, it's not a high priority issue since players will usually immediately respawn after their death, but it's something to point out. It's probably the root cause for issue #12.
The text was updated successfully, but these errors were encountered:
Edited out the error since it's irrelevant to the issue (I was using an outdated version of the mod), but the root issue is still present in the current code-base.
Sortilege saves XP stats of a living entity to a static map
XPHelper.XP_STATS
. While this is fine, this map is never persistently saved. So if die, click on "Title Screen", then close the game (or crash), when you reload the world theModEvents.xpRefill
event listener fails with a null pointer, since the XP stat it's trying to get doesn't exist for the UUID you saved it for.The 1.19.2 version is written in Forge, so this can easily be solved by making a LivingEntity capability and attaching XP stats to it (this can even work with Players, but you'd need to watch out for this issue: MinecraftForge/MinecraftForge#9311). Even though the 1.20.1 version is written in Fabric, I'm sure there is some sort of similar solution to persistently save XP stats.
In any case, it's not a high priority issue since players will usually immediately respawn after their death, but it's something to point out. It's probably the root cause for issue #12.
The text was updated successfully, but these errors were encountered: