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

TL;DR: When switching from IEEP (It's kinda an old mod) to Capabilities, I got 90% of the way there but can't seem to get the NBT data to load properly.

 

So, I've been working on/maintaining a mod sporadically for a long time. It was originally made on 1.6, so it's been through a lot.

 

Recently, I've been trying to port it from 1.8 to 1.10. This meant dropping IEEP, and switching to capabilities. I had a bit of a hard time (entirely due to my own stupidity), but on my most recent attempt got it to work.

 

Kind of.

 

Basically, if I open up a world, do some stuff which would edit the NBT data I'm storing to the player, and exit, the data is saved all fine. I've confirmed this by looking in NBT explorer and seeing the data there. But, upon re-entering the world, it is all reset. Checking level.dat again, I see that the values are now all at their defaults. I've been faffing around for a while, trying to find examples or solutions, and I have come up dry. Can anyone else take a look and see what might be happening? Full disclosure, I'm self-taught when it comes to Java. I know this is "not Java school", I just wanted to give warning in case I've simply done something dumb.

 

Capability Class https://github.com/legobmw99/Allomancy/blob/exp/src/main/java/common/legobmw99/allomancy/common/AllomancyCapabilities.java

 

Event Handler https://github.com/legobmw99/Allomancy/blob/exp/src/main/java/common/legobmw99/allomancy/handlers/AllomancyEventHandler.java

 

Main Mod Class https://github.com/legobmw99/Allomancy/blob/exp/src/main/java/common/legobmw99/allomancy/Allomancy.java

 

 

Thank you very much to anyone who can help. I've been working on this mod as a passion-project for over two years and would love to get it fully functioning again.

You've already set a breakpoint in deserializeNBT and run in the debugger, right? What happened when you stepped through that method?

 

If you didn't even reach that method, try again with a breakpoint set high enough in its call chain that you can see how and why the program branches around the call.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.