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

So I've created an item with a IEnergyStorage Capability via initCapability, and it can receive energy from other blocks and retains its stored energy. But when I attempt to add its currently stored energy to the tooltip via addInformation, the ItemStack supplied has no tag compound.

I've tried using getNBTShareTag to send the server-side storage data to the client, but either the NBT data I'm returning isn't being sent to the client or the ItemStack I'm being given via addInformation is wrong.

 

Here's the relevant code as it currently stands:

https://gitlab.com/snippets/1751590

 

When I update the ItemStack (i.e. move the stack, or transfer energy into its capability) the console outputs:

Share tag: {energy:910}

 

However, when I hover over the stack the console reads:

Stack missing tag compound

 

And the tooltip reads 0

 

Any help as to why this isn't work would be greatly appreciated.

Thanks

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.