How do I change the max health of the player?

Started by Ali107 on Tue, 12/08/2020 - 08:08

Topic category: Help with modding (Java Edition)

Last seen on 11:50, 23. May 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I change the max health of the player?
Tue, 12/08/2020 - 08:08

I want the player to have maximum of  6 hearts, how do I do that?

 

If you know how to program it in through either code or procedure, can you show me how?

Last seen on 23:41, 3. Jun 2021
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
can't you just do absorption…
Wed, 12/09/2020 - 23:53

can't you just do absorption? if not, then maybe you can make a literal clone of absorption BUT with a different overlay that looks like normal hearts, then just set it on player tick update, although I have no idea if it will affect the game at all or lag it to freaking .2 fps

Last seen on 11:50, 23. May 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I can't use absorption…
Thu, 12/10/2020 - 07:26

I can't use absorption because it only adds health it doesn't remove any.

Last seen on 03:20, 8. Jan 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
just use the code from…
Thu, 12/10/2020 - 09:12

just use the code from abosorption and switch the values to negative ones maybe