Posted March 23, 20187 yr Basically, I'm at a stage in my mod where I'd like to take a look at player data that persists upon leaving/dying and is loaded when the player joins or respawns. Only issue being that I can't find any up-to-date tutorials anywhere that help me in this particular area.. I'm hoping to implement a string data value called 'nentype' that has a randomized value from a list of strings that gets set upon joining the game for the first time, and then gets saved for future use. Could anyone give me a run down on how I might be able to go about this, or link me a tutorial that's up to date with forge 1.12.2? Thanks.
March 23, 20187 yr Take a look at capabilities. Create one that stores a string, and set the string when the player joins.
March 25, 20187 yr Author On 3/23/2018 at 3:06 PM, That_Martin_Guy said: Take a look at capabilities. Create one that stores a string, and set the string when the player joins. So I took a look over at the capabilities section on the forge forum (Thanks for that by the way) but I seem to have run into an error... my; CapabilityManager.INSTANCE.register(INen.class, new NenStorage(), Nen.class); line in my CommonProxy seems to have an error, though it's not entirely clear on how I can go about fixing it. The error messages that come up are as follows; https://gyazo.com/b4cfae27d3795d1c439c2127dd5d762c
March 25, 20187 yr I can't really tell completely, but it looks like you're calling that outside a method, which you can't do. If it is inside of a method, post your code instead of showing the error.
March 25, 20187 yr Author 2 minutes ago, That_Martin_Guy said: I can't really tell completely, but it looks like you're calling that outside a method, which you can't do. If it is inside of a method, post your code instead of showing the error. Oh, I didn't think of that. I managed to fix it by putting it within a method, thanks a bunch
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.