Skip to content
These docs are a work in progress and may be incomplete or contain inaccuracies. (Or be for a newer unreleased version of the mod)

Installation

Matthiesen Lib API is available through the Matthiesen Dev Maven repository. Follow the instructions below to add it to your Gradle project.

  • Minecraft 1.21.1
  • Java 21 or higher
  • Fabric Loader 0.17.2+ (for Fabric)
  • NeoForge 21.1.182+ (for NeoForge)

Add the Matthiesen Dev Maven repository to your build.gradle or build.gradle.kts:

repositories {
maven("https://maven.matthiesen.dev/releases") {
name = "devMatthiesenMaven-releases"
content {
includeGroup("dev.matthiesen")
}
}
// For Snapshot versions, also include the snapshots repository
maven("https://maven.matthiesen.dev/snapshots") {
name = "devMatthiesenMaven-snapshots"
content {
includeGroup("dev.matthiesen")
}
}
}

Add the Matthiesen Lib API version to your gradle.properties file:

matthiesen_lib_api_version=1.1.0
Current Release Versions
matthiesen-lib-api-common
matthiesen-lib-api-fabric
matthiesen-lib-api-neoforge
Current Snapshot Versions
matthiesen-lib-api-common
matthiesen-lib-api-fabric
matthiesen-lib-api-neoforge

The dependency you need depends on your project structure:

If you’re writing multi-loader code in a common module:

dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-common:${property("matthiesen_lib_api_version")}") {
isTransitive = false
}
}

In your Fabric module:

dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-fabric:${property("matthiesen_lib_api_version")}")
}

In your NeoForge module:

dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-neoforge:${property("matthiesen_lib_api_version")}")
}

For a typical Architectury-style multi-loader setup:

// In common/build.gradle.kts
dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-common:${property("matthiesen_lib_api_version")}") {
isTransitive = false
}
}
// In fabric/build.gradle.kts
dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-fabric:${property("matthiesen_lib_api_version")}") {
isTransitive = false
}
}
// In neoforge/build.gradle.kts
dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-neoforge:${property("matthiesen_lib_api_version")}") {
isTransitive = false
}
}

Make sure to declare Matthiesen Lib as a dependency in your mod metadata files so users know they need it.

{
"depends": {
"matthiesen_lib_api": ">=1.1.0"
}
}
[[dependencies.yourmodid]]
modId = "matthiesen_lib_api"
type = "required"
versionRange = "[1.1.0,)"
ordering = "AFTER"
side = "SERVER" # or "BOTH" if your mod uses client-side features

After adding the dependency, sync your Gradle project. You should now be able to import Matthiesen Lib classes:

import dev.matthiesen.common.matthiesen_lib_api.MatthiesenLibApi;

If Gradle can’t find the dependency:

  1. Verify the repository URL is correct
  2. Check that you’ve included the correct group (dev.matthiesen)
  3. Ensure the version exists on Maven by visiting maven.matthiesen.dev
  4. Try invalidating caches and restarting your IDE

If you encounter version conflicts:

  1. Ensure all modules use the same version of Matthiesen Lib
  2. Check that your Minecraft version is compatible (1.21.1)
  3. Verify your loader versions meet the minimum requirements