[SOLVED]Pls help me

Started by Patato King on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED]Pls help me
Tue, 07/12/2022 - 14:27 (edited)

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

https://ibb.co/6HHqmzZ

(doesn't work)

Edited by Patato King on Tue, 07/12/2022 - 14:27
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here's some possible…
Tue, 07/12/2022 - 12:31

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)

 

procedure

 

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for replying! But…
Tue, 07/12/2022 - 13:00

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.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to i open mcreator?
Tue, 07/12/2022 - 13:01

how to i open mcreator?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
HOW DO I OPEN MCREATOR?
Tue, 07/12/2022 - 13:01

HOW DO I OPEN MCREATOR?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
-_- Just click the icon
Tue, 07/12/2022 - 13:47

-_- Just click the icon

I suggest you check our…
Wed, 07/13/2022 - 11:48

HOW DO I OPEN MCREATOR?

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