Started by
FerretWithACatHat
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make a mana system for my mod
It needs to:
Be consumed by various tools/ranged items/blocks
Prevent said things from being used if the mana cost is above your current mana
Be displayable on the screen as a number
Be upgradable using advancments
Easy, go on variable tab at the left of your screen, add a variable named Mana with those configs: Type Number, Player_Persistant. and set the initial amount to (what u want, 0 if you want for the player to start with 0 mana).after, create another variable named max_mana, and set it to the max amount of mana the player can have. after create a Overlay, add a Label Text and where you write <VAR:Integer:mana>/<VAR:Interger:max_mana> and put the text where you want. this will show the amount of mana on your screen. (if this <VAR:Integer:mana>/<VAR:Interger:max_mana> dont work, tell me ill send you screenshots too show you how.)
It does not sound easy at all
It does not sound easy at all
so now i have the variables how do I do points 1 and 2? Ive never understood player variables
I made a video tutorial on a Custom Health Bar, just follow it and modify some of it to fit your use - https://youtu.be/kyxSPIczdCU
I wrote in the text VAR:Integer:mana but it didn't work for me. Then I added <>, These brackets are not displayed, and the text is the same.
Make sure the name of the overlay thing is: <VAR:integer:[VARIABLE NAME]> (replace [VARIABLE NAME] with what your variable name is (should be mana)).
None Of These Worked
PLS HELP
In the latest version of mcreator, the <VAR:Integer:Mana> doesn't work, any different methods?
See https://www.youtube.com/watch?v=3wriUZisw8U