Started by
CBJaxxx
on
Topic category: Help with Minecraft modding (Java Edition)
I have a coin pouch that holds coins but I want to make it so that if the player dies they will keep their coin pouch and the coins in it, this may have something to do with itemstacks but there is very little documentation on how to use them especially for this purpose. can someone please make my week and help me solve this issue?
To do that, I see one solution :
Create a number variable type (I call
[nb_item]
) in PLAYER_PERSISTENT, set on 0.Then create the following procedures :
- get the number of coin
- remove coin from the world
- give the coin to the player when he reappear
I want to do something similar but for armor, any way to make the armor keep its enchants when it reappears (preferabley durability too but yeah)