Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)
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...

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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