#Save data on the player in 1.21

9 messages · Page 1 of 1 (latest)

whole current
#

Im trying to make a mana system but everytime the player exits the game the mana resets to 0

zealous maple
#

How are you storing the mana right now?

whole current
#

like this

zealous maple
#

I think that this is missing a few things to make it work. In any case you should probably use an API for this to make your life easier. Fabric API has the data attachment api and there is also cardinal components api. Both of which should have support for proper persistence

whole current
#

is there a tutorial for the data attachment api?

zealous maple
#

No not really, what I do for fabric api stuff is read the test mod and mess around with it. Usually it's intuitive

#

Here: