作者:rebot | 分类:模组
Minecraft 版本: 26.1 26.1.1 26.1.2
平台: fabric
标签: adventure food library
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:reservedhealth is added and a vanilla bug that clamps player health to a maximum of 20 when respawning/joining a world has been fixed.
Health is regenerated by _healthregenerationoverhaul:healthregeneration every _healthregenerationoverhaul:health_tickthreshold ticks.
When health is reduced, regeneration is stopped for _healthregenerationoverhaul:health_regeneration_delaythreshold ticks.
_healthregenerationoverhaul:reservedhealth describes the percentage amount of maximum health that is currently not available.
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.
Casting a "LivingEntity" to the "HealthRegeneratingEntity" interface gives access to all relevant methods.
请登录后举报
暂无评论,抢个沙发吧~