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

Hey guys I made an Item that can store an Ore Location as NBT Data.

unknown.png     unknown.png

The Problem is now that when I drop the Item or move it inside of my Inventory the NBT Data is lost.
Also for some reason when I open a chest or an anvil the NBT Data is lost as well.

unknown.png

Now comes the weird part:
When I open my Inventory in Creative Mode for about 2 seconds it permanently saves the NBT Data. Then I can drop it move it in my inventory and open chests.

unknown.png

Does anybody have an Idea what's going on? I'm clearly not understanding how the Inventory is handled and I also understand that dropping an Item must mean it will be somewhat converted into a different entity.
Thanks in regards for your help!

The Github Repository is:
https://github.com/Brainterminator/utilityblocks

Edited by Brainterminator
Adding GitHub Repo

  • Brainterminator changed the title to [1.18.2] NBT Data on Items being lost upon dropping
  • Author
3 hours ago, diesieben07 said:

You are setting the NBT data client side. You must set it server side.

Yes that was the problem. One of the involved Items still had a isClientSide check. Removing it made it work. Thanks a lot!

Edited by Brainterminator
SOLVED

  • Brainterminator changed the title to [1.18.2] [SOLVED] NBT Data on Items being lost upon dropping
  • 2 weeks later...
  • Author
On 6/22/2022 at 9:15 AM, diesieben07 said:

You need to not remove it, you need to do the check on the server side.

I guess that's what I did. It works totally fine now on Servers and on Single Player

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.