max health after death reset

Started by Janekook7 on

Topic category: Help with modding (Java Edition)

Last seen on 12:07, 21. Apr 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
max health after death reset
Thu, 04/18/2024 - 13:02 (edited)

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
Last seen on 11:56, 29. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what do you mean  
Thu, 04/18/2024 - 13:09

what do you mean

 

Last seen on 11:56, 29. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Frankly, this doesn't make…
Thu, 04/18/2024 - 13:18

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.

Last seen on 12:07, 21. Apr 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i made it that when its…
Thu, 04/18/2024 - 13:20

i made it that when its equals to 1 (which is the lowest it can get) the player gets banned

Last seen on 12:07, 21. Apr 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i did some adjustments and…
Thu, 04/18/2024 - 13:32

i did some adjustments and now its removing one heart on death but after clicking respawn its just reseting to 10

Last seen on 11:56, 29. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you think the lowest…
Thu, 04/18/2024 - 13:45

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.

Last seen on 11:56, 29. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you think the lowest…
Thu, 04/18/2024 - 13:46

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.

Last seen on 12:07, 21. Apr 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I checked it and the max…
Thu, 04/18/2024 - 18:48

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: