Started by chakchak2010 on Thu, 05/08/2025 - 15:35 Topic category: Help with Minecraft modding (Java Edition) I need help, how do I make the item stay equipped after death? Jump to top you could try creating a player persistent itemstack variableif 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. Jump to top Permalink Log in or register to post comments
you could try creating a player persistent itemstack variableif 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. Jump to top Permalink Log in or register to post comments
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.