Sanityfy
by TygrysGames
Sanityfy adds a sanity attribute to entities, with functions that add, remove, multiply, divide or set its value for NeoForge mods and datapacks.
What it does
A sanity attribute with a range from -1000 to 1000 is attached to each entity, starting at a default of 100. Other mods and command-driven content can read the current value through a getter, which returns -1001 when something goes wrong, and change it through add, remove, multiply, divide and set functions. The mod also includes a control procedure that calls six of these functions, so server-side content can react to sanity without writing new code.
The sanity system is meant for shared use: the author recommends keeping the maximum at 100, since other installed mods may use different numbers. Because the attribute is added to entities directly, it works for players and mobs alike. The mod is licensed under the MIT License and is not open source. Sanityfy runs on client and server, so the server and every player need it, and files are published for NeoForge only, for 1.21.1 – 1.21.11.
Key features
Sanity attribute
Each entity gets a sanity value that starts at 100 and can range from -1000 to 1000.
Arithmetic functions
Add, remove, multiply, divide and set functions change an entity's sanity value by a given amount.
Value getter
A getter returns an entity's current sanity, and returns -1001 if an error occurs.
Control procedure
A single procedure exposes six sanity functions for use by server-side content.
Fight-based scale
The author suggests a default and maximum of 100, since other mods may assume different limits.
Compatibility
Latest build for each game version and loader.
1.21.x11 of 11 versions with builds
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Modpack designers
Pack builders can tie scares, debuffs or events to a shared sanity value on every entity.
Datapack and mod authors
Developers can call the getter and functions from their own content instead of storing a separate counter.
Who it’s for: Mod and modpack authors building NeoForge content that depends on a sanity value, and server owners who run packs with that content.
Questions
Does Sanityfy need to be installed on both sides?
Which versions does Sanityfy support?
Why is the default sanity 100?
In the catalog
Sanityfy is one of 3,514 Library mods on ModsFinder, and one of 1,449 Library mods for NeoForge. 19,862 mods support Minecraft 1.21.11.
More from TygrysGames
Similar mods
What the author says
On its own Sanityfy just adds an Attribute with a value from -1000 to 1000 and default 100 that is added to every entity. The mod adds xyz.tygrysgames.sanityfy.procedures.SanityControlerProcedure that you can use to run 6 functions: - addSanity(Entity entity, double value) - adds value to current sanity of entity …
Official listing
- Modrinth page
- modrinth.com/mod/sanityfy
- Owner
- TygrysGames
- Published
- 2026-05-10
- Updated on Modrinth
- 2026-05-11
- Facts verified
- 2026-10-15
