how to increase entity max health

Started by hazar on

Topic category: Advanced modding

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to increase entity max health

I Have an enchant and trying to figure out how to increase the max health of the entity that's wearing armour with it on, whether player or other entity such as a zombie!,

Already iterated through and got the level of the enchant combined across all armour slots, but i cant seem to find a block of code for setting max health, only current!

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and how does this help may I…
Wed, 02/03/2021 - 21:57

and how does this help may I ask?

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hazar if you use MCreator…
Sat, 02/13/2021 - 18:21

hazar if you use MCreator 2021.1 with 1.16.4 Support you can use the Command /attribute.

If you use MCreator 2020.5 use this Plugin: DTM's Toolkit - Attributes (v1.1.0) | MCreator

Check this Wiki for the /attribute Command: Commands/attribute – Official Minecraft Wiki (gamepedia.com)

Or try the Command /attribute yourself in Minecraft 1.16.4.

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But the Plugin should work…
Sat, 02/13/2021 - 18:23

But the Plugin should work on MCreator 2021.1 too.

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe you can add health…
Mon, 03/08/2021 - 14:15

maybe you can add health boost effect when worn

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hello sorry i come here late…
Sun, 07/10/2022 - 05:07

hello sorry i come here late but i cannot make it work, if you could give me a tutorial or something like it, i explain the idea, i want a item that gives you an especific effect (more hearts in this case but want many many more) when held in an especific gui (that i already created), but no when it is in the inventory, more or less like an curios, in this case like an artifact that gives you an amount of hearts, but i dont find nothing that helps me in the procedures. also can you give me a discord to ask this questions? thanks! sorry about the ooga booga english i am talkin now

 

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello. Try to do this…
Tue, 07/12/2022 - 03:55

Hello. Try to do this procedure. Put a global trigger "when updating the player's clocks" If - the item is in the inventory. Run - run the command (here is the command for the attribute. I'm at work now and don't have access to the computer. Look it up on the Internet. Well, or I'll write later) Further differently - and again the same command, but with a value of 20 (standard health) I hope clearly written, otherwise I do not know English well. I am using google translator.

Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Health boost pretty much…
Tue, 07/12/2022 - 22:59

Health boost pretty much just adds to a player's max health, so you should just do:

If event/target entity has [any armor] in slot [slot number for armor]

 if get effect level/amplifier for [health_boost] < enchantment level of armor in slot [slot number for armor]

  give effect [health_boost] to event/target entity for 999999 ticks level [enchantment level of armor in slot [slot number for armor]]

else

 clear effect [health_boost} for event/target entity