How can i keep my mana system from going past a growing maximum?

Started by MitamaKirai on

Topic category: Help with modding (Java Edition)

Last seen on 11:02, 26. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can i keep my mana system from going past a growing maximum?

as the title says i made a mana system with variables already have a working overlay and such but i wanna ask if there is a better way to keep it from going past the max which ive used another variable for currently it kinda bugs out for a few seconds spamming the number a bit over and back down for a few seconds before stopping any way i can fix that? also is there any way i can make the regen system better? ty in advance 

here's the procedure to keep it below max

Here is the mana regen system