Started by
hazar
on
Topic category: Advanced modding
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!
Values over 1024 are not supported by mc
and how does this help may I ask?
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.
But the Plugin should work on MCreator 2021.1 too.
maybe you can add health boost effect when worn
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
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.
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