Download Mana Attributes — Minecraft Mods — MetaMods
Mana Attributes

Mana Attributes

Active

Downloads

9

Last update

1 month ago

Versions

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

Mana Attributes

This API implements a mana system controlled through entity attributes.

Basic Implementation

Living entities can possess mana reserves up to the value of _generic.max_mana. Mana regeneration occurs at the rate of _generic.mana_regeneration every _generic.mana_tick_threshold game ticks.

When mana is consumed, its regeneration is paused for _generic.mana_regeneration_delay_threshold ticks.

The _generic.reserved_mana parameter determines the percentage of maximum mana reserves that are currently unavailable for use.

When mana level drops to zero or below, regeneration stops for _generic.depleted_mana_regeneration_delay_threshold ticks.

Default Attribute Values

  • _generic.max_mana: 0
  • _generic.mana_regeneration: 0
  • _generic.mana_tick_threshold: 20
  • _generic.mana_regeneration_delay_threshold: 20
  • _generic.depleted_mana_regeneration_delay_threshold: 60
  • _generic.reserved_mana: 0

System Configuration

When the "naturalManaRegeneration" game rule is activated, players receive additional mana regeneration of 1 unit.

Client configuration allows customization of interface elements displaying mana information.

Programming Interface

To access all main system functions, it's necessary to convert a "LivingEntity" object to the "ManaUsingEntity" interface.

Project members
TheRedBrain

TheRedBrain

Developer

Created: 6 May 2024

ID: 11996