Getting Started [Minecraft 26.1.2 and 26.2] - mezz/JustEnoughItems GitHub Wiki
[!NOTE] Version note: This page covers Minecraft 26.1.2 and 26.2. These versions use separate common, NeoForge, and Fabric API artifacts.
Other setup pages:
- Minecraft 1.12.2: Getting Started
- Minecraft 1.16.5: Getting Started
- Minecraft 1.18.2, 1.19.2, and 1.20.1: Getting Started
- Minecraft 1.21 and 1.21.1: Getting Started
- Minecraft 1.21.11: Getting Started
Set up your Gradle build script
Repositories
repositories {
maven {
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.dev"
}
}
Dependencies for NeoGradle (for NeoForge)
dependencies {
/* other minecraft dependencies are here */
// compile against the JEI API but do not include it at runtime
compileOnly("mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}")
// at runtime, use the full JEI jar for NeoForge
runtimeOnly("mezz.jei:jei-${mc_version}-neoforge:${jei_version}")
}
Dependencies for Loom (for Fabric)
Minecraft 26.1.2 and 26.2 use non-remapped JEI artifacts, so use normal Gradle dependency configurations instead of Loom's mod* configurations.
dependencies {
/* other minecraft dependencies are here */
// compile against the JEI API but do not include it at runtime
compileOnly("mezz.jei:jei-${mc_version}-fabric-api:${jei_version}")
// at runtime, use the full JEI jar for Fabric
runtimeOnly("mezz.jei:jei-${mc_version}-fabric:${jei_version}")
}
Choose a Version
${mc_version} gets replaced by 26.1.2 or 26.2.
${jei_version} gets replaced by the JEI version you want to use. Use a JEI version that was published for your exact Minecraft version.
The platform API artifacts depend on their matching common API artifact in their Maven POMs, so you do not need to declare the common API separately.
These properties can be set in a file named gradle.properties, placed in the same directory as your build.gradle file.
For example:
mc_version=26.2
jei_version=30.7.0.41
Why compile against the API?
The example script only compiles against the API, which is very stable. When you run your mod, the full JEI jar will run as well so that you can test with it in development.
If you compile against the full mod jar and then use classes from JEI that are not in the API, your mod could break any time JEI updates.
If you need a feature that is not in the API, ask on the issue tracker: https://github.com/mezz/JustEnoughItems/issues