NaNny: Fix NaN Health & Absorption in Minecraft

NaNny for Minecraft: When Health and Absorption Go Wrong If you have ever seen a mob or player behave like they are stuck between life and death, or watched combat math fall apart after a big mod stack, you might be dealing with broken floating-point values. In modded Minecraft, some mods mishand...

Download NaNny for Minecraft 1.21.1, 1.16.5

Original name: NaNny

Minecraft: 1.16.5, 1.21.1

Loaders: Forge, NeoForge

FileVersionLoaderSize
NaNny-1.0.0.jar1.16.5Forge5 КБDownload
NaNny-1.0.1.jar1.16.5Forge5 КБDownload
NaNny-1.21.1-1.0.1.jar1.21.1NeoForge5 КБDownload

NaNny for Minecraft: When Health and Absorption Go Wrong

If you have ever seen a mob or player behave like they are stuck between life and death, or watched combat math fall apart after a big mod stack, you might be dealing with broken floating-point values. In modded Minecraft, some mods mishandle numbers and accidentally set an entity’s health or absorption to NaN—not a number. That is not a vanilla biome problem or a crafting recipe issue; it is a math glitch that can cascade through combat, healing, and server ticks. NaNny is a small but focused NeoForge and Forge mod that steps in when other mods cannot keep their floats under control.

What NaN Means in Modded Combat

In Minecraft, health and absorption are stored as numbers that should always stay finite and predictable. When a mod divides by zero, mixes incompatible formulas, or applies a bad attribute modifier, the result can become NaN. Once that happens, damage events, healing, and absorption updates stop behaving normally. You might notice odd entity states, inconsistent death logic, or strange interactions on servers where many mechanics fire at once. Fixing the root cause in every mod is not always practical, especially in large modpacks where updates and versions shift constantly.

How NaNny Cleans Up Broken Values

NaNny is built for NeoForge and Forge and targets the problem at the event layer. It hooks into several living entity events so it can catch bad values as soon as they appear:

  • LivingAttackEvent – when an entity is attacked
  • LivingDamageEvent – when damage is applied
  • LivingHealEvent – when healing is processed
  • LivingHurtEvent – when hurt calculations run

When NaNny detects that health or absorption has been set to NaN through these paths, it can cancel the problematic outcome and optionally restore the entity to a sane state. That keeps combat loops, server logic, and entity updates from spiraling when a single mod misbehaves. If you are curating a modpack and want a straightforward way to pull in stability helpers, this mod can be easily installed via the foxygame.net launcher—a convenient, flexible, and modern Minecraft launcher where you can download mods right from the menu—so you spend less time juggling files and more time testing mechanics in-game.

Configuration: nanny-server.toml

NaNny writes its server settings to a TOML file so you can tune behavior per world without recompiling anything. On a dedicated server or in a single-player world with server configs, look for the file at world/serverconfig/nanny-server.toml. The options are short but meaningful:

  • doHeal (default: true) – When enabled, NaNny can set the entity’s health to a safe value after NaN is dealt or healed onto them, instead of leaving them in a broken state.
  • health (default: 1.0) – This is a percentage of max health to apply when recovery triggers. Tune it if you want entities to bounce back at full life, a scratch, or something in between.
  • log (default: true) – Turning this on records when something tried to push an entity’s health to NaN, which is invaluable on servers when you need to trace which interaction misfired.

Logging is especially helpful when you are bisecting mods or comparing versions after an update. A clean log line can point you toward a specific mechanic long before players report “weird invincibility” or “instant weird HP.”

Who Should Use NaNny?

NaNny is for players, pack makers, and server operators who stack many mods that touch combat, attributes, and absorption—think custom damage types, RPG-style shields, or experimental bosses. It is not a replacement for reporting bugs to mod authors, but it is a practical safety net that keeps worlds playable while you wait for patches. It also pairs well with disciplined testing: reproduce the issue, read the NaNny log if enabled, then narrow the mod list or update the offending project.

Conclusion

NaN health and absorption are rare in vanilla Minecraft but surprisingly common at the intersection of complex mods and fast combat math. NaNny gives NeoForge and Forge setups a dedicated cleanup path by listening on the right living events and offering configurable healing and logging through nanny-server.toml. Whether you run a public server or a private modded world, having a mod that cancels bad float states and restores consistent entity health is a small change with outsized stability benefits—one more tool to keep blocks, biomes, and boss fights feeling fair long after the next game update lands.