Started by
CBJaxxx
on
Wed, 03/08/2023 - 17:48
Topic category: Help with 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