need help creating a procedure!

Started by chakchak2010 on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 months ago
Joined May 2025
Points:
17

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
need help creating a procedure!

I need help, how do I make the item stay equipped after death?

Active 2 days ago
Joined Apr 2025
Points:
41

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 37
you could try creating a…
Wed, 06/04/2025 - 06:36

you could try creating a player persistent itemstack variable

if entity dies, if entity is player put itemcopy into itemstack, then remove item from inventory (in case a gravestone mod runs alongside it)

if player respawns: add itemstack to player inventory, then set itemstack to empty itemstack. 

you can also check, if gamerule keepinventory is active, and only run these procedures, if its not.