Skip to content

Depending on Rutile

Rutile version: 2.1.0

Minecraft version: 1.21.1

This page describes how a mod developer can add a dependency on Rutile.

Release jars of Rutile...

  • are built and published manually.
  • are published when the developers feel that enough features have been added since the previous release.
  • are published as a GitHub release.

Types of Dependencies

Development Environment Dependency

This type of dependency is added to the Gradle buildscript so that Gradle and your IDE can find Rutile's code.

Configuration

The following code defines the maven where Rutile and Registrate jars are hosted and defines dependencies on those.

groovy
    repositories {
        maven { url = "https://api.modrinth.com/maven" } // Rutile
        maven { url = "https://maven.ithundxr.dev/snapshots" } // Registrate
    }

    dependencies {
        implementation("com.tterrag.registrate:Registrate:${registrate_version}")
        implementation("maven.modrinth:rutile:${rutile_version}")
    }
kotlin
    repositories {
        maven("https://api.modrinth.com/maven") // Rutile
        maven("https://maven.ithundxr.dev/snapshots") // Registrate
    }

    dependencies {
        implementation("com.tterrag.registrate:Registrate:${property("registrate_version")}")
        implementation("maven.modrinth:rutile:${property("rutile_version")}")
    }

And in your gradle.properties file:

properties
rutile_version = 2.1.0-mc1.21.1
registrate_version = MC1.21-1.3.0+67

Production Environment Dependency

This type of dependency is added to the neoforge.mods.toml file so that NeoForge knows your mod will not work without a certain version of Rutile. This type of dependency is only useful if a development environment dependency was also added. This type of dependency should not be added if your mod is able to work in a production environment without Rutile.

Configuration

Add the following dependency definition to your neoforge.mods.toml file, replacing ${modid} with your mod's ID. This tells Forge that your mod depends on Rutile. If Rutile is not present or is outdated, NeoForge will display an error screen explaining this to the user.

toml
[[dependencies.${mod_id}]]
    modId="rutile"
    type="required"
    versionRange="[2.1.0,2.2.0)"
    ordering="NONE"
    side="BOTH"