Appearance
Getting started
Add Rimulib to your project
Rimulib isn't on a public Maven repository yet, so you build against the jar.
- Download the release jar for your loader from CurseForge.
- Fabric release jars hold one jar per Minecraft version. Open the jar as a zip and copy the one you need out of
META-INF/jars/into your project'slibs/folder. For Minecraft 1.21.11 that'srimulib-fabric-1.21.11-1.2.2+mc1.21.11.jar. - Add it to
build.gradle:
groovy
dependencies {
modCompileOnly files("libs/rimulib-fabric-1.21.11-1.2.2+mc1.21.11.jar")
}On Minecraft 26.3, use compileOnly instead of modCompileOnly.
Declare the dependency
Players install Rimulib next to your mod, so don't bundle it.
json
"depends": {
"rimulib": ">=1.2.2"
}toml
[[dependencies.mymod]]
modId = "rimulib"
mandatory = true
versionRange = "[1.2.2,2.0)"
ordering = "NONE"
side = "BOTH"On NeoForge 1.21.1, use type = "required" in place of mandatory = true, in neoforge.mods.toml.
Connect your mod
Call connect once, from your mod's main class. Keep the handle in a static field.
java
public class MyMod implements ModInitializer {
public static final RimuMod MOD = RimulibApi.connect("mymod", MyMod.class);
@Override
public void onInitialize() {
MOD.log().info("Connected to Rimulib {}", RimulibApi.version());
}
}The class you pass marks your mod's root package, so use your main class. The handle gives you:
| Method | What it gives you |
|---|---|
log() | A log file named after your mod |
log(file) | A log file with your own name |
properties(file) | A settings file in the config folder |
id(path) | The text mymod:path |
You don't need any mixins or setup calls. Rimulib loads its own mixins and ticks its own systems.
Forge and NeoForge
Forge and NeoForge jars hold both Minecraft versions, each in its own package:
| Minecraft | Import from |
|---|---|
| 1.20.1 | cyou.rimuru.rimulib.mc1201.api and cyou.rimuru.rimulib.mc1201.client.api |
| 1.21.1 | cyou.rimuru.rimulib.mc1211.api and cyou.rimuru.rimulib.mc1211.client.api |
Forge and NeoForge have no separate client source set, so keep calls to the client.api classes in code that only runs on the client.
Where to go next
Pick a guide from the sidebar. Carving terrain is a good first one.
