Need help with natural regen of bar

Started by AravindGamer712 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help with natural regen of bar


So i wanted to make the Mana amount go up every 80 ticks till mana reaches 10 is this good or does this not work?
please help

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
image not working... you can…
Tue, 11/30/2021 - 06:54

image not working... you can use a while-loop to check if the mana is less than 10, then you use a wait procedure block that waits 80 ticks to increase the mana.

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the latest one you posted…
Wed, 12/01/2021 - 15:19

the latest one you posted should work.

though if your mana goes above 10, it'll just keep rising without stopping

If you want to keep your mana from rising and allow it to go above ten, you should replace the "=" sign with ">=" greater than equal sign. this'll make sure your mana stops rising when its 10 or higher.

If you want to have a max mana, add another if statement that checks if the mana is greater than max mana and if so, set it to the max mana.

 

Hope i helped! <3

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you very much i will…
Thu, 12/02/2021 - 16:33

thank you very much i will do that cause I don't want it to go above 10 for now