Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • 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

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.

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.