Nitea for NeoForge
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 NeoForge mod with Nitea already set up, and can create your Nitea project for you. →Before you start
- A NeoForge mod built with ModDevGradle (
net.neoforged.moddev). For Minecraft 1.20.1, ModDevGradle Legacy (net.neoforged.moddev.legacyforge). - Java 17 for Minecraft 1.20.1, Java 21 for 1.21.x, Java 25 for 26.x.
- A free account on nitea.cc.
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
modIdinneoforge.mods.toml, and pick NeoForge. - 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
- Minecraft 1.20.1
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
jarJar(implementation("cc.nitea:nitea-neoforge-26.2:0.3.0"))
}
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
jarJar(implementation("cc.nitea:nitea-neoforge-26.1:0.3.0"))
}
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
jarJar(implementation("cc.nitea:nitea-neoforge-1.21.11:0.3.0"))
}
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
jarJar(implementation("cc.nitea:nitea-neoforge-1.21.1:0.3.0"))
}
repositories {
maven { url 'https://libraries.nitea.cc' }
}
dependencies {
jarJar(modImplementation("cc.nitea:nitea-neoforge-1.20.1:0.3.0"))
}
jarJarputs the Nitea jar inside your mod jar, so players never install anything extra.- When several mods bundle Nitea, NeoForge loads one copy, the newest. Every mod uses it, with one consent screen.
- Nitea is a game library, not a mod. Don't list it as a dependency in
neoforge.mods.toml: there's no mod ID to depend on.
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
At the start of your mod constructor (the class annotated with @Mod):
- Minecraft 26.2
- Minecraft 26.1
- Minecraft 1.21.11
- Minecraft 1.21.1
- Minecraft 1.20.1
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLPaths;
@Mod(ExampleMod.MODID)
public final class ExampleMod {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
public ExampleMod(IEventBus modEventBus, ModContainer modContainer) {
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(modContainer.getModInfo().getVersion().toString())
.gameDir(FMLPaths.GAMEDIR.get())
.build());
// the rest of your setup
}
}
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLPaths;
@Mod(ExampleMod.MODID)
public final class ExampleMod {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
public ExampleMod(IEventBus modEventBus, ModContainer modContainer) {
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(modContainer.getModInfo().getVersion().toString())
.gameDir(FMLPaths.GAMEDIR.get())
.build());
// the rest of your setup
}
}
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLPaths;
@Mod(ExampleMod.MODID)
public final class ExampleMod {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
public ExampleMod(IEventBus modEventBus, ModContainer modContainer) {
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(modContainer.getModInfo().getVersion().toString())
.gameDir(FMLPaths.GAMEDIR.get())
.build());
// the rest of your setup
}
}
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLPaths;
@Mod(ExampleMod.MODID)
public final class ExampleMod {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
public ExampleMod(IEventBus modEventBus, ModContainer modContainer) {
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(modContainer.getModInfo().getVersion().toString())
.gameDir(FMLPaths.GAMEDIR.get())
.build());
// the rest of your setup
}
}
import cc.nitea.Nitea;
import cc.nitea.NiteaClient;
import cc.nitea.NiteaOptions;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLPaths;
@Mod(ExampleMod.MODID)
public final class ExampleMod {
public static final String MODID = "examplemod";
public static NiteaClient NITEA;
public ExampleMod() {
NITEA = Nitea.init(NiteaOptions.builder(MODID)
.owner(ExampleMod.class)
.release(ModLoadingContext.get().getActiveContainer().getModInfo().getVersion().toString())
.gameDir(FMLPaths.GAMEDIR.get())
.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 NeoForge. 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 your constructor:
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, NeoForge, 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.
NeoForge notes
Nitea isn't in the mod list. That's expected: it's a game library (FMLModType: GAMELIBRARY) that runs next to Minecraft. Its consent screen and title screen button still show up.
Minecraft 1.20.1. NeoForge for 1.20.1 is a fork of Forge 47: it still uses the net.minecraftforge packages, META-INF/mods.toml and a mod constructor without parameters. The dependency is a modImplementation so it's remapped like your other mod dependencies. The 1.20.1 tabs above show the right code.
Something doesn't work? See Troubleshooting. Adding .debug(true) to the options logs every request Nitea makes.