Utility Nexus Fixes (1.3.0)
Curse Maven Snippet
What's new
v1.3.0 - NaN/Infinity health & absorption guard
Feature release. Adds a new always-on vanilla-level protection: a player or mob can no longer get
permanently stuck with a corrupted (NaN/Infinity) health or absorption
value, and a save that was already corrupted by an earlier bug self-heals the moment it
loads — no manual save editing required.
Added
- LivingEntity NaN/Infinity health and absorption guard (always on, client and
server): protects the vanilla
LivingEntity#setHealth(float)andLivingEntity#setAbsorptionAmount(float)setters from non-finite writes. - Root cause behind this release: on a live server, a player was hit by a boss
mob whose attack computes damage as a percentage of the target's current health
(a third-party attribute mechanic). When that percentage attribute was driven to
Infinityby a malformed affix roll on the boss, and the target's health landed on exactly0.0at the instant of the hit,Infinity × 0.0 = NaNin IEEE-754 float math. ThatNaNthen flowed into the vanilla damage pipeline and was subtracted from health, permanently poisoning it; a similar overheal-to-absorption codepath in the same mechanic poisoned absorption the same way. Direct inspection of the affected player's save file confirmed that onlyHealthandAbsorptionAmountwereNaN— every other field, includingminecraft:generic.max_health, was completely intact. BecauseNaNfails every numeric comparison, the vanilla death check (health <= 0) never fired again: the player was stuck alive but unable to be healed, damaged, or killed by normal means. - Two
HEAD-cancellable mixin injections now reject any non-finite write before it can reach the entity's state, keeping the last known-good value and logging a warning naming the entity and the rejected value. - They also self-heal already-corrupted state: if the value already stored on
the entity is itself non-finite (e.g. loaded from a save made before this guard existed), health is
reset to
getMaxHealth()(or20.0as a fallback) and absorption to0.0, automatically, the moment the entity loads.
Notes
This does not patch whichever third-party mod produced theInfinity/NaNvalue in the first place — it only hardens vanilla against ever storing a corrupted value it receives, regardless of source.
JAR: utility_nexus_fixes-1.21.1-neoforge-21.1.249-1.3.0.jar
Tag: 1.21.1-neoforge-1.3.0
This mod has no additional files

