Download Mana Attributes — Minecraft Mods — ModStock
Mana Attributes

Mana Attributes

Active

Downloads

9

Last update

6 months ago

Versions

1.20.1 — 1.21.1
Client and server
Fabric
Adventure
Game mechanics
Libraries
Magic

Mana Attributes

This API adds a mana system controlled by entity attributes.

Default implementation

LivingEntities can have up to _generic.maxmana amounts of mana. Mana is regenerated by _generic.manaregeneration every _generic.mana_tickthreshold ticks.

When mana is reduced, regeneration is stopped for _generic.mana_regeneration_delaythreshold ticks.

_generic.reservedmana describes the percentage amount of maximum mana that is currently not available.

When mana is <= 0, regeneration is stopped for _generic.depleted_mana_regeneration_delaythreshold ticks.

Default attribute values

  • _generic.maxmana: 0
  • _generic.manaregeneration: 0
  • _generic.mana_tickthreshold: 20
  • _generic.mana_regeneration_delaythreshold: 20
  • _generic.depleted_mana_regeneration_delaythreshold: 60
  • _generic.reservedmana: 0

Customization

When the gamerule "naturalManaRegeneration" is true, players have 1 additional mana regeneration.

The client config allows customizing the HUD element.

API

Casting a "LivingEntity" to the "ManaUsingEntity" interface gives access to all relevant methods.

Project members
TheRedBrain

TheRedBrain

Developer