Keep an item on death

Started by Coolkc456 on

Topic category: Help with modding (Java Edition)

Last seen on 00:59, 4. Feb 2023
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Keep an item on death

I don't want a specific item dropping on the ground when the player dies and having it stay in the player's inventory. Does anyone know how to do this? Thanks in advance.

Last seen on 11:41, 31. Mar 2024
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I would try saving the item…
Fri, 07/23/2021 - 18:50

I would try saving the item as a variable (itemstack). When the player dies, the item is saved, and when he respawns, it's loaded / given to him.

Last seen on 16:18, 10. Apr 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know this is a somewhat…
Thu, 02/15/2024 - 02:07

I know this is a somewhat old thread but can you show me how to do that, mainly the variable part and the part to load it since im confused