Maximum health

Started by _RedLine_ on

Topic category: Help with modding (Java Edition)

Last seen on 15:43, 21. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maximum health

Help, please. How to make a mod in which it will be so that when a player enters the game for the first time, he has a random maximum amount of health between 20-50 units. 

Last seen on 10:24, 27. Apr 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There must be a plugin…
Mon, 03/18/2024 - 12:23

There must be a plugin called "Attributes". After downloading that plugin use the "Set base value of attribute of to" block and make the choosen attribute "Max Health"

20 is default player health. 1 hearth = 2 health point so configure that like this.

Set global trigger to "player joined world"

set base value of attribute Max Health of event/target entity to (number of your choosing)

Last seen on 10:24, 27. Apr 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you want to make it…
Mon, 03/18/2024 - 12:24

If you want to make it random just make a local number variable and set it to random integer between 20-50 then set the attribute to that variable.