How do I increase player life with healt boost in exact amounts?

Started by a guy called l… on

Topic category: Help with modding (Java Edition)

Last seen on 23:35, 30. Oct 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I increase player life with healt boost in exact amounts?

I know that healt boost gives 4 hearts per level, but I want to be more exact, to increase life by 3 hearts it has to be -0.25 (remember that the effects are given +1), 2 hearts would be -0.5 and a heart would be -0.75 ?

Last seen on 19:15, 17. Mar 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i would make a new varible …
Thu, 02/18/2021 - 16:01

i would make a new varible "bonus health" then on trigger entity damage  if the entity is a player reduct 1-4 from "bonus health" then heal player (cant remember if theres heal entyu block, if not do instant health.) that much health.

 

 

next you must make it so when eat food if health = 10 heal x (you will substitue x for bonus health max) and give hunger for x time.

 

finally do a new procedure "if bonus health > max health set to max health.

 

hope that works :)