CurseForge · Minecraft mod
NightLib
This mod is a library designed to log mod performance!
Quick answer
Which NightLib release matches 1.21.1?
NightLib Neoforge 1.21.1 1.4.0 targets 1.21.1 with NeoForge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.
Where it goes
Is NightLib 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 NightLib Neoforge 1.21.1 1.4.0 need?
NightLib Neoforge 1.21.1 1.4.0 on 1.21.1. Every mod below is checked against that same setup.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add NightLib without breaking your instance.
Built for NightLib Neoforge 1.21.1 1.4.0 on 1.21.1. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use NightLib Neoforge 1.21.1 1.4.0. It targets 1.21.1 with NeoForge; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 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 NightLib Neoforge 1.21.1 1.4.0. It opens that exact file at the source.
About this project
What does NightLib add?
We can use this library to track mod performance.
The mod also features a system that recognizes your mods, so you can use /nightlib mods and it will display all mods using the API.
You can also direct people to your forum or Discord in case of issues with the mod or high RAM usage using /nightlib info <mod>
Why Use NightLib?
NightLib provides a library that allows you to monitor your mod's performance and identify potential issues! Plus, it's incredibly easy to use.
Implement the Library in your mod
1 - Build.gradle:
repositories {
maven { url = "https://nightsult.github.io/NightLib/maven" }
}
dependencies {
// Format: net.night:NightLib-<loader>-<Minecraft version>:1.3.0
modImplementation "net.night:NightLib-fabric-1.20.1:1.3.0"
}
2 - Register your mod
import net.night.nightlib.api.ModProfiler;
import net.night.nightlib.api.NightlibAPI;
public final class MyMod {
public static final String MOD_ID = "mymod";
public static ModProfiler PROFILER;
public static void init() {
// Optional: support link shown in /nightlib info
NightlibAPI.register(MOD_ID, "https://discord.gg/your-invite");
// Registers the mod (if it isn't already) and returns its profiler
PROFILER = NightlibAPI.getProfiler(MOD_ID);
}
}
3 - Reporting performance
// Option A: try-with-resources (recommended)
try (var ignored = PROFILER.start("tick")) {
doTickWork();
}
// Option B: pass a Runnable
PROFILER.time("network", MyMod::processPackets);
// Option C: measure it yourself, in nanoseconds
long start = System.nanoTime();
generateStructure();
PROFILER.record("world_gen", System.nanoTime() - start);
4 - Report Errors
try {
generateStructure();
} catch (Exception e) {
PROFILER.reportError("world_gen", e);
LOGGER.error("Failed to generate structure", e);
}
Project description from CurseForge.
Pick your setup
NightLib by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
26.1.2
2 loader builds1.21.1
2 loader builds1.20.1
2 loader buildsCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
NightLib versions and loaders
NightLib Neoforge 1.21.1 1.4.0
NightLib-Neoforge-1.21.1-1.4.0.jar
2 Dec 2026
NightLib Fabric 1.21.1 1.4.0
NightLib-Fabric-1.21.1-1.4.0.jar
2 Dec 2026
NightLib-Neoforge-1.21.1-1.3.0
NightLib-Neoforge-1.21.1-1.3.0.jar
21 Sept 2026
NightLib-Fabric-1.21.1-1.3.0
NightLib-Fabric-1.21.1-1.3.0.jar
21 Sept 2026
Looking for an older file? The official CurseForge project page is in Resources.
