Posted August 26, 201312 yr I want to create an integer variable and have it be read and written to NBT but to the EntityPlayer NBT so it saves for everytime you close and reopen minecraft but is also different for each world, and the NBT of EntityPlayer does that. However I want to do this without editing the class EntityPlayer or any base classes for that matter. Is this possible? If so how? A further point is I'd like to do it from my base class or my proxy file. This would be great but if it can only be done from creating a separate class than I don't mind. Thanks in advance.
August 26, 201312 yr This is very possible. If you have lots of data that you want to store, than you can make a class that implements IExtendedEntityProperties ( or something similar to that name ). Or you can use NBTTagCompound playerNBT = playerInstance.somethingToGetNBT(); playerNBT.setInteger( "MyIntegerForSomethingToBeStored", myIntegerToBeStored ); I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
August 27, 201312 yr Author Thank you. I will look into these tomorrow and get back to you as to if they worked (they probably do anyway)
August 27, 201312 yr Thank you. I will look into these tomorrow and get back to you as to if they worked (they probably do anyway) There are a few extra things with the interfacing way, with the NBTTagCompound straight from the player... I haven't really done that. I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.