Health Regeneration Overhaul
This API changes health regeneration to be attribute-driven and (optionally) disables the hunger/saturation system.
介绍
Health Regeneration Overhaul
This API changes the way health is regenerated. Instead of depending on the hunger system, entity attributes are
used.
The vanilla hunger system including exhaustion and saturation is disabled by default.
Additionally, an entity attribute called _healthregenerationoverhaul:reserved_health_ is added and a vanilla bug that clamps player health to a maximum of 20 when respawning/joining a world has been fixed.
Default implementation
Health is regenerated by _healthregenerationoverhaul:health_regeneration_ every _healthregenerationoverhaul:health_tick_threshold_ ticks.
When health is reduced, regeneration is stopped for _healthregenerationoverhaul:health_regeneration_delay_threshold_ ticks.
_healthregenerationoverhaul:reserved_health_ describes the percentage amount of maximum health that is currently not available.
Default attribute values
- _healthregenerationoverhaul:health_regeneration_: 0
- _healthregenerationoverhaul:health_tick_threshold_: 100
- _healthregenerationoverhaul:health_regeneration_delay_threshold_: 100
- _healthregenerationoverhaul:reserved_health_: 0
Customization
When the vanilla game rule “natural_health_regeneration” is true, players have 1 additional health regeneration.
In the client config an alternative health bar can be enabled and customised.
The server config has options to set the default value for each attribute (including max_health). This only affects the attribute values for players, not other entities.
Also in the server config, the vanilla food system can be re-enabled.
API
Casting a “LivingEntity” to the “HealthRegeneratingEntity” interface gives access to all relevant methods.
常见问题
Health Regeneration Overhaul 支持哪些 Minecraft 版本?
Health Regeneration Overhaul 支持 Minecraft Java 版 1.20.1–26.1.2,共 8 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Health Regeneration Overhaul 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
TheRedBrain 的其他作品
查看全部 →Shield API
制作带有自定义模型的盾牌,从未如此简单!
Bundle API
Bundle API allows mod authors to easily add bundles that can hold more than 1 stack of items specified by an item tag.
Slot Customization API
A small API for mods to dynamically modify inventory slots. Allows changing the position, disabling/enabling slots and adds tooltips for empty slots.
Better Combat Extension
Extends the mod 'Better Combat' with additional functionality.
评论
登录后评论和评分