I sort of get what you're saying. Yet, I sort of don't. Let me explain my situation because I think I would be getting even greater help by detailing.
In my mod, the player gets this thing called Stamina after mining up the ore. I want to be able to save that data in, maybe, the level.dat or another dat file, so when the world's opened, it has the saved int. Is there a clear method for that? I just want a way to save the int to be opened later.