CurseForge · Minecraft mod
KubeJS Sanity
Sanity integration for KubeJS
Quick answer
Which KubeJS Sanity release should I use?
KubeJS Sanity SanityJS-1.2.0-1.19.2.jar targets 1.19.2 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. All 5 required mods have matching files.
Where it goes
Is KubeJS Sanity required on the client, server, or both?
The project page does not say whether this file belongs on the client, dedicated server, or both.
The source does not explicitly classify this release as client-only or server-only.
What else does KubeJS Sanity SanityJS-1.2.0-1.19.2.jar need?
SanityJS-1.2.0-1.19.2.jar. Change the file and its required mods may change too.
Install Sanity: Descent Into Madness, KubeJS, GeckoLib, Rhino and 1 more first. We found matching files for this game-version and loader setup. 3 come through another mod in the chain.
3 extra mods were pulled in by other dependencies. Indented rows show who needs each one. We only count dependency files that match this setup. A file for another loader does not fill the gap.
Before you install it
Add KubeJS Sanity without breaking your instance.
Built for KubeJS Sanity SanityJS-1.2.0-1.19.2.jar. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use SanityJS-1.2.0-1.19.2.jar. It targets 1.19.2 with Forge; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
Install Sanity: Descent Into Madness, KubeJS, GeckoLib, Rhino and 1 more first. We found matching files for this game-version and loader setup. 3 come through another mod in the chain.
- 03
Put it on the correct side
The project page does not say whether this file belongs on the client, dedicated server, or both.
- 04
Pick the file you checked
Use the “Get this file” button beside SanityJS-1.2.0-1.19.2.jar. It opens that exact file at the source.
About this project
What does KubeJS Sanity add?
🧰 Intro
Sanity integration for Kubejs. Add/Modify Sanity's feature so the kubejs users can has more control on Sanity.
🔧 Completed Features
1. Event in KJS
SanityEvents.change(event => {
// Access old and new sanity values
let oldSanity = event.getPreviousSanity();
let newSanity = event.getSanity();
// Example: Apply effects or trigger custom logic
if (newSanity <= 20) {
event.getEntity().addPotionEffect('minecraft:nausea', 200, 1);
}
});
SanityEvents.indicatorRender(event => {
event.cancel();
})
2. Sanity Manipulation Methods
The integration provides several methods to manage sanity values effectively:
getSanity(): Returns the current sanity value.
getPreviousSanity(): Returns the sanity value before the change.
setSanity(value): Sets the player's sanity to a specific value (0-100).
addSanity(value): Increases the player's sanity by the specified amount.
player.getSanity(): get Player's sanity directly.
3. Utility Functions
Additional utility functions are provided to handle mathematical operations related to sanity:
clampNorm(value): Normalizes a number to a value between 0 and 1.
unclampNorm(normalizedValue): Converts a normalized value back to a readable number.
approximation(value, n): Truncates a number to n significant decimal places, useful for precise sanity calculations.
🔍 Areas for Improvement
Adding more events to allow complete modification and controll of Sanity's tickPlayer.
Adding more events about render to allow better controll on render effects.
Additional Sanity Sources: Consider expanding sanity manipulation to include more sources or conditions, such as environmental effects or interactions with specific mobs.
🔄 Future Enhancements
Add Passive source of Sanity (Might support Hot reload?).
Able to modify visible rules based on player's sanity.
By incorporating these features and potential enhancements, the Sanity integration for KubeJS aims to offer a richer and more interactive modding experience for both developers and players.
> Please Join our Discord server if you have any quesion.
Project description from CurseForge.
Pick your setup
KubeJS Sanity by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.20.1
2 loader builds1.19.2
2 loader buildsCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
KubeJS Sanity versions and loaders
SanityJS-1.2.0-1.19.2.jar
2 Apr 2026
SanityJS-1.2.0.jar
2 Apr 2026
SanityJS-1.1.3.jar
6 May 2025
SanityJS-1.1.2.jar
5 May 2025
SanityJS-1.1.2.jar
3 May 2025
SanityJS-1.1.1.jar
22 Nov 2024
SanityJS-1.1.1.jar
18 Nov 2024
SanityJS-1.1.0.jar
13 Nov 2024
SanityJS-1.0.1.jar
25 Aug 2024
Looking for an older file? The official CurseForge project page is in Resources.