Nitea for Fabric
Nitea reports the errors and crashes your mod causes to your dashboard, and lets players send bug reports and suggestions. This page takes you from nothing to your first reported error.
Starting a new mod? The mod configurator downloads a ready-to-run Fabric mod with Nitea already set up, and can create your Nitea project for you. →Before you start
- A Fabric mod built with Fabric Loom:
net.fabricmc.fabric-loomon Minecraft 26.x,net.fabricmc.fabric-loom-remapon 1.21.x. - Java 21 for Minecraft 1.21.x, Java 25 for 26.x.
- A free account on nitea.cc.
You don't need Fabric API.
1. Create a project
- Sign in at nitea.cc, open Projects and choose New project.
- Enter your mod's name and its mod ID, exactly as
idinfabric.mod.json, and pick Fabric. - Copy the SDK key (
nt_…). It's shown only once; you can regenerate it later.
2. Add Nitea to build.gradle
Pick your Minecraft version. Every code block on this page follows your choice.
- Minecraft 26.2
- Minecraft 26.1
- Minecraft 1.21.11
- Minecraft 1.21.1
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
include(implementation("cc.nitea:nitea-fabric-26.2:0.3.0"))
}
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
include(implementation("cc.nitea:nitea-fabric-26.1:0.3.0"))
}
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
include(modImplementation("cc.nitea:nitea-fabric-1.21.11:0.3.0"))
}
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
include(modImplementation("cc.nitea:nitea-fabric-1.21.1:0.3.0"))
}
includeputs the Nitea jar inside your mod jar, so players never install anything extra.- When several mods bundle Nitea, Fabric loads one copy, the newest. Every mod uses it, with one consent screen.
- Don't add Nitea to
dependsinfabric.mod.json: the copy you bundle is always there. - On 1.21.x Loom remaps mods, so it's
modImplementation. From 26.1 Minecraft isn't obfuscated and it's a plainimplementation.
3. Add your SDK key
Create src/main/resources/nitea/<modid>.properties, with your mod ID in the file name:
sdkKey=nt_your_sdk_key
Keep it out of git:
src/main/resources/nitea/*.properties
The key can only send events to your project, never read anything, but there's no reason to publish it. To build releases in CI, see Build in CI.
4. Start Nitea
In your main entrypoint (the class under entrypoints.main in fabric.mod.json), at the start of onInitialize():
- Minecraft 26.2
- Minecraft 26.1
- Minecraft 1.21.11
- Minecraft 1.21.1
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
public final class ExampleMod implements ModInitializer {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
@Override
public void onInitialize() {
FabricLoader loader = FabricLoader.getInstance();
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(loader.getModContainer(MODID).orElseThrow().getMetadata().getVersion().getFriendlyString())
.gameDir(loader.getGameDir())
.build());
// the rest of your setup
}
}
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
public final class ExampleMod implements ModInitializer {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
@Override
public void onInitialize() {
FabricLoader loader = FabricLoader.getInstance();
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(loader.getModContainer(MODID).orElseThrow().getMetadata().getVersion().getFriendlyString())
.gameDir(loader.getGameDir())
.build());
// the rest of your setup
}
}
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
public final class ExampleMod implements ModInitializer {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
@Override
public void onInitialize() {
FabricLoader loader = FabricLoader.getInstance();
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(loader.getModContainer(MODID).orElseThrow().getMetadata().getVersion().getFriendlyString())
.gameDir(loader.getGameDir())
.build());
// the rest of your setup
}
}
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
public final class ExampleMod implements ModInitializer {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
@Override
public void onInitialize() {
FabricLoader loader = FabricLoader.getInstance();
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(loader.getModContainer(MODID).orElseThrow().getMetadata().getVersion().getFriendlyString())
.gameDir(loader.getGameDir())
.build());
// the rest of your setup
}
}
Call Nitea.init first, so errors in the rest of your setup are reported too. owner tells Nitea which code is yours; release and gameDir come from Fabric Loader. All options are in the NiteaOptions reference.
You don't build a consent screen: Nitea shows its own, once for every mod using it.
5. Send a test error
-
Start the game:
./gradlew runClient. -
The first time the title screen opens, Nitea asks whether mods may send reports. Choose Allow reports. Nothing is ever sent before that.
-
Capture something from your mod, for example at the end of
onInitialize():NITEA.captureException(new IllegalStateException("Hello from Nitea")); -
Open Issues in your dashboard. The error shows up within a few seconds, with its stack trace and the Minecraft, Fabric, Java and OS versions.
That's it. Remove the test line before releasing.
What Nitea does from now on
- Uncaught exceptions your mod causes are reported automatically, and so are Minecraft crashes your mod causes, on the next launch. Errors caused by other mods are never sent to you. See Automatic reporting.
- Players choose. Reports are only sent after the player allows them on Nitea's consent screen, and they can change their mind from the Nitea button on the title screen. See Player consent.
- Dedicated servers have no screen: the server owner allows reports in a config file. See Dedicated servers.
Next steps
- Capture errors with levels, tags and messages.
- Add breadcrumbs, so every error comes with what your mod did before it.
- Let players send bug reports and suggestions, and show them on a public roadmap.
Fabric notes
Nitea in the mod list. On Fabric, Nitea is a small library mod with the ID nitea and no entry point. Mod Menu lists it under libraries.
Mod IDs with dashes. Fabric allows - in mod IDs and so does Nitea. In the environment variable for the key it becomes _: for my-mod it's NITEA_MY_MOD_SDK_KEY.
Mixins. Errors thrown by code your mixins inject into Minecraft are reported by your mod, like errors in your own classes.
Something doesn't work? See Troubleshooting. Adding .debug(true) to the options logs every request Nitea makes.