Sprache

Health Regeneration Overhaul

Health Regeneration Overhaul

Modrinth

This API changes health regeneration to be attribute-driven and (optionally) disables the hunger/saturation system.

8.2k Downloads 14 Follower aktualisiert 2mo ago
neueste v4.0.0 Modrinth
Fabric 1.20.1 – 26.1.2 AdventureFoodLibrary

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.

Versionen

Release
4.0.0
fabric · 26.1, 26.1.1, 26.1.2 · 2mo ago
# 4.0.0 - updated to 26.1.x
167
Release
3.1.0
fabric · 1.21.11 · 4mo ago
# 3.1.0 - updated to 1.21.11 ## Additions - the custom health icon bar now shows absorption hearts - the custom health icon bar now displays reserved…
149
Release
3.0.0
fabric · 1.21.10 · 7mo ago
# 3.0.0 - updated to 1.21.10 - icon bar now blinks when health amount changes (like in vanilla) ## Changes - removed "generic." prefix from all entity…
157
Release
2.6.1
fabric · 1.21.1 · 8mo ago
# 2.6.1 - fixed health being set to 1 when joining a world for the first time - bumped various dependency versions
649
Release
2.6.0
fabric · 1.21.1 · 9mo ago
# 2.6.0 - added server config options to define the default for each health related attribute (only affects players) and adjusted the default values of those…
78
Release
2.5.0
fabric · 1.21.1 · 10mo ago
# 2.5.0 - added alternative health bar consisting of icons, similar to vanillas health bar (this first iteration does not yet support multiple icon types per…
305
Release
1.3.1
fabric · 1.20.1 · 18mo ago
# 1.3.1 - fixed an issue where the regeneration delay after taking damage was not applied correctly
1.3k
Release
2.4.1
fabric · 1.21.1 · 18mo ago
# 2.4.1 - fixed an issue where the regeneration delay after taking damage was not applied correctly
835
Release
2.4.0
fabric · 1.21.1 · 18mo ago
# 2.4.0 HUD rendering overhaul The initial idea of splitting a bar into three textures per "layer" to allow for easy change of the bar length, came with the…
76
Release
1.3.0
fabric · 1.20.1 · 18mo ago
# 1.3.0 HUD rendering overhaul The initial idea of splitting a bar into three textures per "layer" to allow for easy change of the bar length, came with the…
230
Release
2.3.0
fabric · 1.21.1 · 21mo ago
# 2.3.0 - further improvements to health bar customization
384
Release
2.2.0
fabric · 1.21.1 · 21mo ago
# 2.2.0 - update to 1.21.1 - improved health bar customization - fixed an issue where entities would rarely be immortal
766

Kommentare 0

Noch keine Kommentare. Sei der Erste, der seine Meinung teilt.