In this page, you will learn how to setup Roughly Enough Items in your development environment.

Table of Contents


Adding Maven Repositories

REI is hosted on shedaniel’s maven, if you have already added architectury’s maven, you are good to go as that’s an alias to shedaniel’s maven.

Use one of the following two urls:

maven { url "<https://maven.shedaniel.me/>" }
maven { url "<https://maven.architectury.dev/>" }

Adding Gradle Dependency

REI 6+ (1.17+)

First, we will add a runtime dependency on REI, this will allow REI to show up in your development environment, even for non-plugin development.

You may find the versioning of REI in Linkie Dependencies.

dependencies {
  // REI Runtime for Fabric
  modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:$rei_version"

  // REI Runtime for Forge (Architectury Loom)
  modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-forge:$rei_version"

  // REI Runtime for Forge (ForgeGradle)
  runtimeOnly fg.deobf("me.shedaniel:RoughlyEnoughItems-forge:$rei_version")
}

Then optionally, we will declare a compile only dependency on REI’s API, this will ensure that we only use classes that are stable.

dependencies {
  // REI API for Architectury Common
  modCompileOnly "me.shedaniel:RoughlyEnoughItems-api:$rei_version"
  modCompileOnly "me.shedaniel:RoughlyEnoughItems-default-plugin:$rei_version"

  // REI API for Fabric
  modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:$rei_version"
  modCompileOnly "me.shedaniel:RoughlyEnoughItems-default-plugin-fabric:$rei_version"

  // REI API for Forge (Architectury Loom)
  modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-forge:$rei_version"
  modCompileOnly "me.shedaniel:RoughlyEnoughItems-default-plugin-forge:$rei_version"

  // REI API for Forge (ForgeGradle)
  compileOnly fg.deobf("me.shedaniel:RoughlyEnoughItems-api-forge:$rei_version")
  compileOnly fg.deobf("me.shedaniel:RoughlyEnoughItems-default-plugin-forge:$rei_version")
}

ForgeGradle madness

If you are using ForgeGradle, you have to manually add REI’s dependencies. Remember, all versions are on Linkie Dependencies.

dependencies {
    implementation fg.deobf("me.shedaniel.cloth:cloth-config-forge:$cloth_config_version")
		implementation fg.deobf("dev.architectury:architectury-forge:$architectury_version")
}

Then, to fix mixin remapping issues in development environments, you have to manually configure Mixins, thankfully architectury’s documentation had already covered this.