Compatibility
Minecraft: Java Edition
1.21.x
1.20.1
Platforms
Fabric
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Licensed MIT
Published 6 months ago
Updated 2 months ago
Mana Attributes
This API adds a mana system controlled by entity attributes.
Default implementation
LivingEntities can have up to generic.max_mana amounts of mana. Mana is regenerated by generic.mana_regeneration every generic.mana_tick_threshold ticks.
When mana is reduced, regeneration is stopped for generic.mana_regeneration_delay_threshold ticks.
When mana is <= 0, regeneration is stopped 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
Customization
When the gamerule "naturalManaRegeneration" is true, players have a mana regeneration of at least 1.
The client config allows customizing the HUD element. The details are explained in this wiki article.
API
Casting a "LivingEntity" to the "ManaUsingEntity" interface gives access to all relevant methods.