Minecraft.How
加载中...
跳至内容

NaNny

作者 Qther

NaNny is a server-side utility mod that intercepts and cancels events setting entity health or absorption to NaN, providing configurable healing and logging options.

我们的介绍

这个项目能做什么

Overview

NaNny is a utility and quality-of-life mod designed to clean up after other modifications that set entity health or absorption values to NaN (Not a Number). When other mods introduce calculations that result in invalid floating-point values for health or absorption, NaNny intervenes directly on the server to prevent improper state changes and restore affected entities.

Event Interception and Mechanics

To catch invalid numerical assignments, NaNny hooks into four living entity events provided by the mod loader:

  • LivingAttackEvent
  • LivingDamageEvent
  • LivingHealEvent
  • LivingHurtEvent

When any of these four monitored events attempts to deal or heal a NaN value to an entity's health or absorption, NaNny cancels the event. In addition to cancelling the event, the mod can optionally heal the affected entities based on the configured server settings.

Server Configuration

NaNny creates a TOML configuration file located at world/serverconfig/nanny-server.toml. Server administrators can customize the following options:

  • doHeal: Enables setting the health of an entity when NaN is dealt or healed to them. This setting defaults to true.
  • health: Sets the percentage of maximum health assigned to an entity when NaN is dealt or healed to them. This setting defaults to 1.0 (100% of maximum health).
  • log: Controls whether or not to log events that set an entity's health to NaN. This setting defaults to true.

Setup and Compatibility

NaNny is authored by Qther and licensed under the GNU General Public License v3.0 only. It falls into the Utility & Quality of Life category.

In terms of installation requirements, NaNny is required on the server side and unsupported on the client side. Honestly, connecting clients do not need to install the mod.

NaNny supports the Forge and Neoforge mod loaders across Minecraft versions 1.16.5, 1.18, 1.18.1, 1.18.2, 1.20.1, 1.20.2, 1.20.4, 1.21, 1.21.1, 26.1, 26.1.1, and 26.1.2.

反应

登录后即可做出反应。

兼容性

版本与加载器

已记录 8 个版本

图库

NaNny icon

我们使用 Cookie 来改善您的体验。继续使用本网站即表示您同意我们使用 Cookie。 阅读我们的隐私政策