need help creating a procedure!

Started by chakchak2010 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2025
Points:

User statistics:

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

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

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.