[SOLVED]Pls help me

Started by Patato King on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Jul 2022
Points:
431

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
[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
Active 1 year ago
Joined Jun 2022
Points:
439

User statistics:

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

 

Active 3 years ago
Joined Jul 2022
Points:
431

User statistics:

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

Active 2 years ago
Joined Jul 2022
Points:
413

User statistics:

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

how to i open mcreator?

Active 2 years ago
Joined Jul 2022
Points:
413

User statistics:

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

HOW DO I OPEN MCREATOR?

Active 3 years ago
Joined Jul 2022
Points:
431

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
-_- 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