Started by
Janekook7
on
Topic category: Help with Minecraft modding (Java Edition)
I am making a lifesteal mod that upon death make you drop a heart and decrease the player max health by one but upon death its just reset to 8 hearts
Edited by Janekook7 on Thu, 04/18/2024 - 13:02
what do you mean
Frankly, this doesn't make much sense. Because after you die 10 times, your health starts to go negative. There is no way to change it from negative to positive in that case, so the only solution other than deleting your world is to transfer proper player data to the relevant folder in the world folder. Ultimately, this causes you to become immortal. But if you have a plan to reset it to default standard values under a certain condition, I can help.
i made it that when its equals to 1 (which is the lowest it can get) the player gets banned
i did some adjustments and now its removing one heart on death but after clicking respawn its just reseting to 10
If you think the lowest value it can get is 1, you are wrong. Because if we try this deliberately, we will see that it drops to negative values.
If you think the lowest value it can get is 1, you are wrong. Because if we try this deliberately, we will see that it drops to negative values.
I checked it and the max health cant go to negative...
also i fixed it but know i have another problem(adding a picture)
the problem is that part of the execute command dont work with an error
this is the "Get command entity parameter" part: