TL;DR: When switching from IEEP (It's kinda an old mod) to Capabilities, I got 90% of the way there but can't seem to get the NBT data to load properly.
So, I've been working on/maintaining a mod sporadically for a long time. It was originally made on 1.6, so it's been through a lot.
Recently, I've been trying to port it from 1.8 to 1.10. This meant dropping IEEP, and switching to capabilities. I had a bit of a hard time (entirely due to my own stupidity), but on my most recent attempt got it to work.
Kind of.
Basically, if I open up a world, do some stuff which would edit the NBT data I'm storing to the player, and exit, the data is saved all fine. I've confirmed this by looking in NBT explorer and seeing the data there. But, upon re-entering the world, it is all reset. Checking level.dat again, I see that the values are now all at their defaults. I've been faffing around for a while, trying to find examples or solutions, and I have come up dry. Can anyone else take a look and see what might be happening? Full disclosure, I'm self-taught when it comes to Java. I know this is "not Java school", I just wanted to give warning in case I've simply done something dumb.
Capability Class https://github.com/legobmw99/Allomancy/blob/exp/src/main/java/common/legobmw99/allomancy/common/AllomancyCapabilities.java
Event Handler https://github.com/legobmw99/Allomancy/blob/exp/src/main/java/common/legobmw99/allomancy/handlers/AllomancyEventHandler.java
Main Mod Class https://github.com/legobmw99/Allomancy/blob/exp/src/main/java/common/legobmw99/allomancy/Allomancy.java
Thank you very much to anyone who can help. I've been working on this mod as a passion-project for over two years and would love to get it fully functioning again.