Started by
Darned
on
Topic category: Help with Minecraft modding (Java Edition)
How can you make, for example, a sword that does not drop out after the player has died so that this item remains in the inventory after it is revived?
Topic category: Help with Minecraft modding (Java Edition)
How can you make, for example, a sword that does not drop out after the player has died so that this item remains in the inventory after it is revived?
Use persistent player variable to flag if player had specific item in inventory when it died and then use global triggers to add them back
Uhh I have a similar problem. A player while using my custom item becomes its owner, and the item remembers who owns it so no one else could use it. The problem is, when the owner dies, items he owned should return to their normal state like before. To solve this, I tried storing a player persistent variable to link for owned items, and clear their data if the owner dies, but it seems that an item-type variable actually does not link, but stores a copy instead.