Jump to content

[SOLVED][1.16] How to stop resetting nbt when player dies?


theagente00g

Recommended Posts

I have a class of items called Ragnarok_Cards. My ideia was creating the item Loot_Box with would spawn a random already seen card.

For that I was registering in nbt of player every time he pickup a card. But when the player dies, the nbt is reset.

How I can stop the nbt from resetting?
( Or if this is not the proper way of storing extra data of the player, what is the right one?)

ย 

Ragnarok_Card: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/Items/RagnarokCard.java

Pickup event: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/Events/PickUp.java

Loot_Box: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/Items/LootBox.java

Edited by theagente00g
Link to comment
Share on other sites

  • theagente00g changed the title to [SOLVED][1.16] How to stop resetting nbt when player dies?

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.