How to link specific item to specific player?

Started by Krronos on Thu, 06/30/2022 - 04:34

Topic category: Help with modding (Java Edition)

Last seen on 06:04, 14. Jul 2022
Joined Nov 2020

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to link specific item to specific player?
Thu, 06/30/2022 - 04:34

I'm trying to create an item that will have a custom NBT tag that is unique to a specific player in some way. I need a procedure to run code blocks in the specific player that each instance of the item is linked to. Problem is I can't figure out how to take a NBT tag's value and convert it into an entity that can be used in code blocks. I am willing to try anything, including functions and commands. So far I've come up with the idea to give each player a unique numerical ID upon joining, and have their item have that ID in its NBT tag. I still can't figure out how to link them though.