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 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 version to your gradle.properties file, Note: Generally you will only specify one version for both the API and the LIB, as their versions should always be in sync.

matthiesen_lib_version=1.1.0

Release Versions:

Matthiesen Lib APIMatthiesen Lib
matthiesen-lib-api-common matthiesen-lib-common
matthiesen-lib-api-fabric matthiesen-lib-fabric
matthiesen-lib-api-neoforge matthiesen-lib-neoforge

Snapshot Versions:

Matthiesen Lib APIMatthiesen Lib
matthiesen-lib-api-common matthiesen-lib-common
matthiesen-lib-api-fabric matthiesen-lib-fabric
matthiesen-lib-api-neoforge matthiesen-lib-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_version")}") {
isTransitive = false
}
modImplementation("dev.matthiesen:matthiesen-lib-common:${property("matthiesen_lib_version")}") {
isTransitive = false
}
}

In your Fabric module:

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

In your NeoForge module:

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

For a typical Architectury-style multi-loader setup:

// In common/build.gradle.kts
dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-common:${property("matthiesen_lib_version")}") {
isTransitive = false
}
modImplementation("dev.matthiesen:matthiesen-lib-common:${property("matthiesen_lib_version")}") {
isTransitive = false
}
}
// In fabric/build.gradle.kts
dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-fabric:${property("matthiesen_lib_version")}") {
isTransitive = false
}
modImplementation("dev.matthiesen:matthiesen-lib-fabric:${property("matthiesen_lib_version")}") {
isTransitive = false
}
}
// In neoforge/build.gradle.kts
dependencies {
modImplementation("dev.matthiesen:matthiesen-lib-api-neoforge:${property("matthiesen_lib_version")}") {
isTransitive = false
}
modImplementation("dev.matthiesen:matthiesen-lib-neoforge:${property("matthiesen_lib_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",
"matthiesen_lib": ">=1.1.0"
}
}
[[dependencies.yourmodid]]
modId = "matthiesen_lib_api"
type = "required"
versionRange = "[1.1.0,)"
ordering = "AFTER"
side = "BOTH"
[[dependencies.yourmodid]]
modId = "matthiesen_lib"
type = "required"
versionRange = "[1.1.0,)"
ordering = "AFTER"
side = "BOTH"

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

import dev.matthiesen.common.matthiesen_lib.MatthiesenLib;
import dev.matthiesen.common.matthiesen_lib.MatthiesenLib.RegistryBuilder;

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

Now that you have Matthiesen Lib installed, learn how to use it:

Explore the Registry Builder API to see how to register content from common code.
Check out the Commands page to learn how to create cross-platform commands.
Find out how to implement permissions with the Permissions system.
Discover how to register client-side features like screens and renderers in the Client-Side Features section.
Integrate with the Embers Text API for immersive messaging with the Embers Integration guide.
Utilize helpful utilities like the ItemBuilder in the Utilities section.