介绍
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.
常见问题
Mana Attributes 支持哪些 Minecraft 版本?
Mana Attributes 支持 Minecraft Java 版 1.20.1–26.1.2,共 8 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Mana Attributes 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
TheRedBrain 的其他作品
查看全部 →Shield API
制作带有自定义模型的盾牌,从未如此简单!
Bundle API
Bundle API 让模组作者可以轻松添加容量超过一组物品的收纳袋,袋中可存放由物品标签指定的物品。
Better Combat Extension
为“Better Combat”模组添加更多功能。
Slot Customization API
一个小型前置库,让模组能够动态调整物品栏槽位的位置,并启用或禁用槽位。
评论
登录后评论和评分