Started by
Patato King
on
Topic category: Help with Minecraft modding (Java Edition)
How can I create a procedure that if the player doesn't take damage for a while he will regenerate health? Here is my code
(doesn't work)
Edited by Patato King on Tue, 07/12/2022 - 14:27
Here's some possible solutions -
First thing - it's best to check if the NBT timer is BELOW OR EQUAL to 0.
Second thing - You can transform the first "If do else" into two "if do"
Third thing (which has a high chance of being the issue) - You have put it so it gives you a potion of level 0 (try making it level 5 just to test).
Anyway, here's a screenshot of me trying to remake the procedure if none of the above works
(ik it says Fireballcounter and that its a global variable, but just use your local health from the picture you sent)
Thank you for replying!
But your code doesn't work because the statement doesn't support local variables but i found another solution i exchanged the local variables with nbt data number tags.
It wasn't because of the amplifier from the potion, the amplifier 0 equals the potion effect 1 in Minecraft.
how to i open mcreator?
HOW DO I OPEN MCREATOR?
-_- Just click the icon
I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei