Skip to content

Magic Helper Methods

Deadlydiamond98 edited this page Aug 1, 2024 · 8 revisions

Methods

addMana(int amount)

setMana(int value)

How to Use

All entities start off with a Magic Level of 0 and a Max Magic of 100 by default, they are added to LivingEntities, so you just call it like any other LivingEntity method

Here's a small example on how you'd call these methods:

public void exampleManaMethod(LivingEntity user) {
    if (user.canAddMana(10)) {
        user.addMana(10)
    }

Clone this wiki locally