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.

tylermmorton

Members
  • Joined

  • Last visited

  1. Thanks. I'll have a look at them. They seem a lot more flexible than IInventory. Is there an example implementation of the Forge wiki?
  2. Hi, I'm programming an item that has it's own inventory inside, and I'm using NBT to store the itemstacks of the inventory. The problem is, every time I open the inventory of the item it resets my NBT tags to a new compound. Here is the code. http://pastebin.com/9BjeE9D6 (edit - the param "backpack" is actually "stack" in the code.) Every time I create a new isntance of ItemInventory using the exact same ItemStack, it always ends up not having a tag compound, and ends up generating a new one. (I know this because of the sysouts that get called when I add a test tag) My only guess as to why the NBT data isn't saving is because Java's pass-by-value system, where the ItemStack I'm passing into this constructor never gets changed where it actually resides in memory, and in turn the data is not getting saved. If anyone has an insight on this, that would be awesome thanks!

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.