Maximum health

Started by _RedLine_ on

Topic category: Help with Minecraft modding (Java Edition)

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. 

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)

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.