#Mana bar from ISS (1.20.1)

22 messages · Page 1 of 1 (latest)

primal whale
#

Hello there!
I need some help with some stuff like mana bar from Iron's Spells and Spell books. I want to make it with no mana regeneration, but without need in writing in-game commands every time I die or enter new world. Also this would help to give proper experience to my friend who are playing my modpack

wheat magnetBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

pallid sun
#

@elfin solstice I remember you having some experience with no mana regen, how did you achieve that?

elfin solstice
pallid sun
#

☝️

primal whale
elfin solstice
#

ye

primal whale
#

Got it, tnx

primal whale
#

Just like in example with crafting, but based on player entering the world or something?

#

How does it looks like?

#

And do I need this setting thing from the same script example?

#

Ahhuuuu

#

So now I need to do something with player.logged_in and out?

#

So where I have to put it to?

elfin solstice
#

you can do something like this

PlayerEvents.tick(event => {
    event.player.modifyAttribute('irons_spellbooks:mana_regen', // attribute ID
        'zero_mana_regen', // attribute modifier ID
        -100, // this will reduce mana regen by 10,000 percent. it doesn't matter if it goes negative.
        // if mana regen goes below 0, it still acts like 0.
        'multiply_total' // math operation. we're using multiply_total so that it counts even the other attribute modifiers.
    )
})
#

goes in server scripts btw

primal whale
#

Omg

#

Now gonna try understand it, Im very much of a beginner

#

TNX dude!!!!!!

#

U just saved me, but I'll also try to learn and use it for something else