Maximum health

Started by _RedLine_ on

Topic category: Help with Minecraft modding (Java Edition)

Active 7 months ago
Joined Feb 2024
Points:
183

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
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. 

Active 1 month ago
Joined Mar 2024
Points:
170

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 23
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)

Active 1 month ago
Joined Mar 2024
Points:
170

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 23
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.