
Originally Posted by
Mordikai
Er... It doesn't quite work like that.
In Java, a program consists of a number of files of code, not just one long file. These files are known as class files. Generally speaking, each class file concerns one particular system or group of related systems within the program. Hence, in Minecraft, you might have Item.class, Entity.class, and Block.class. However, each of these class files have, in turn, a number of subclasses. Subclasses are class files that deal with more specific elements. Again, for example, within the superclass Entity.class, you have the subclass EntityPlayer.class, the subclass EntitySkeleton, and so on.
I'm storing the grist in a floating-point variable in the EntityPlayer.class file. When the game saves/loads, it reads/writes from the NBT, which is used to save the world data.
Now, if I put it in the ItemGristReader.class file that I created, that would make things... well, less intuitive, at the very least. It would also mean that losing the item would result in the loss of the player's grist cache.
...That's the simplest explanation that I can give without going too in depth about Object Oriented programming. I advise you to check around online for a more thorough explanation, as I have omitted most of the details.
If you have any more "quick questions", pester me. My handle is meticulouslyWhimsical.