Use the ManaBarLib Mod Directly In Mcreator
-
Custom Procedures, API, and Animated Progress Bar
To use begin by enabling the External API from the by clicking workspace settings at the top right --> external API's --> Check ManaBarLib
The plugin adds the following procedures:
1) Set the ManaBar visibility to <true/false> for <target entity>
2) Set ManaBar percentage to <number> for <target entity>
3) Set cooldown regeneration time to <number> ticks for <target entity>
4) Get current ManaBar percentage for <target entity>
Initially the ManaBar will be toggled off, so make sure to turn it on using the visibility procedure
The ManaBar will appear at the bottom left of the players screen when toggled on
After exporting the mod you will need to add the ManaBarLib mod as a dependency - it can be found here:
ManaBarLib Page
Comments
Hey, im trying to make a spell that consumes 1 mana percentage every tick, but i cant figure out how to put up the procedure. I tried to do the same thing that @Max10tails did, and gives the same error. I would the mana bar to go down smoothly and not with a certain amount. Is there a way to do that? Hope i have explained good enough, and i apologize if maybe i missed something in what u said. Thanks in advance.
Let me explain better: I would like the mana bar to drop by 1 percent every tick of minecraft. Is there a way to do this, or am I forced to use the "set mana percentage" block and set it to a specific value? Using this block, therefore, I cannot reduce the mana, but only set its value to a specific number, right?
use the global trigger on player tick update (i think that's what its called) with an if statement and whatever conditions you want. to make the manabar go down each tick, use the following procedure:
[set manabar percentage of [Event Target entity] to [get manabar percentage of [Event Target entity]] - 1]
this procedure will run each tick because of the global iterator and know what player to apply the change to. let me know if it doesn't work or if you need more help.
whats the point of the "get current manabar percentage of event/target entity" block if you can't use it with adding and subtracting mana?