Моды/Mana Attributes
Mana Attributes

Mana Attributes

A small API that adds a mana system controlled by entity attributes.

5.2K
8

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.

generic.reserved_mana describes the percentage amount of maximum mana that is currently not available.

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
  • generic.reserved_mana: 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.

Совместимость

Minecraft: Java Edition

1.20.1–1.21.10

Платформы

Поддерживаемые окружения

Клиент и сервер

Создатели

Детали

Лицензия:MIT
Опубликован:1 год назад
Обновлён:5 дней назад
Главная