I need help making it so a player keeps certain items upon death

Started by TNTBoss971 on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 weeks ago
Joined Jul 2020
Points:
631

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
I need help making it so a player keeps certain items upon death

I want to make a Bond enchantment where any items that have it on them act like keep inventory, however, I can't get it to work. Does anyone have any advice?

I cant figure out how to add screen shots, but what I'm doing is when an entity dies, I'm checking to see if its a player. If it is, then I check their inventory for items with the bond enchantment. This is where I'm stuck. How do I give the player their item back?

Active 2 minutes ago
Joined Sep 2024
Points:
84

User statistics:

  • Modifications: 2
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 64
I want to make a Bond…
Tue, 02/18/2025 - 20:52

I want to make a Bond enchantment where any items that have it on them act like keep inventory, however, I can't get it to work. Does anyone have any advice?

I cant figure out how to add screen shots, but what I'm doing is when an entity dies, I'm checking to see if its a player. If it is, then I check their inventory for items with the bond enchantment. This is where I'm stuck. How do I give the player their item back?

so tag the items with a tag(e.g. bonded) and so on player respawn, gives the player those items.