Maximum health

Started by _RedLine_ on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 day ago
Joined Feb 2024
Points:
101

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
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 5 months ago
Joined Mar 2024
Points:
86

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 17
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 5 months ago
Joined Mar 2024
Points:
86

User statistics:

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