Started by
Jinbaili
on
Topic category: Help with Minecraft modding (Java Edition)
Hey guys,
I'm trying to make heart containers which add 1 heart each time I eat one. That part is a succes. Now I got a problem with the maxHealth when I die and I can't figure how to keep the extra hearts when I respawn. They just disappear as if they never existed.
Does someone know a way to fix this?
Here is my current procedure:
https://gyazo.com/a6fb3b2049854e71c315ac3260ebeaef
- Kimberly
Persistent variables.
I think they are currently only in 1.16. I could be wrong about that.
Chew
Don't know how to use the persistent variables propperly and can't find a thread where it is explained, so I tried this and it didn't work, when I'd die I still lost the health. Can you or someone else help me out?
Here is my current procedure (I'd use GLOBAL_SESSION as a variable):
https://gyazo.com/4fed4d272dbd4f64b529affdfae564b6
- Kimberly