Just Enough Items (JEI)

Just Enough Items (JEI)

369M Downloads

[Crash]: Unable to load JEI correctly with ArchitecturyLoom and Forge

Bread-NiceCat opened this issue ยท 3 comments

commented

Steps to Reproduce the Crash

The exception thrown is

Caused by 1: java.lang.NoClassDefFoundError: mezz/jei/common/util/MinecraftLocaleSupplier
		at mezz.jei.forge.JustEnoughItems.<init>(JustEnoughItems.java:22) ~[jei-1.20.1-forge-15.2.0.25.jar%23201!/:15.2.0.25] {re:classloading}
dependencies {
    modCompileOnly "mezz.jei:jei-1.20.1-forge-api:15.2.0.25"
    modRuntimeOnly "mezz.jei:jei-1.20.1-forge:15.2.0.25"
}

Here's the build.gradle

plugins {
    id "com.github.johnrengelman.shadow" version "7.1.2"
}

architectury {
    platformSetupLoomIde()
    forge()
}
loom {
    accessWidenerPath = project(":common").loom.accessWidenerPath
    forge {
        convertAccessWideners = true
        extraAccessWideners.add loom.accessWidenerPath.get().asFile.name

        mixinConfig "candycraftce-common.mixins.json"
        mixinConfig "candycraftce.mixins.json"
    }
    runs {
        client {
            vmArg "-Dmixin.debug.export=true"
            vmArg "-Dmixin.debug.verbose=true"
        }
    }
}
configurations {
    common
    shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
    compileClasspath.extendsFrom common
    runtimeClasspath.extendsFrom common
    developmentForge.extendsFrom common
}

repositories {
    flatDir {
        dir "libs"
    }
}

dependencies {
    forge "net.minecraftforge:forge:${rootProject.forge_version}"
    // Remove the next line if you don't want to depend on the API
//    modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}"


    modRuntimeOnly "local:appleskin-forge-mc1.20.1:2.5.0"
//JEI
    modCompileOnly "mezz.jei:jei-1.20.1-forge-api:15.2.0.25"
    modRuntimeOnly "mezz.jei:jei-1.20.1-forge:15.2.0.25"

    common(project(path: ":common", configuration: "namedElements")) { transitive false }
    shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
}

processResources {
    inputs.property "version", project.version

    filesMatching("META-INF/mods.toml") {
        expand "version": project.version
    }
}

shadowJar {
    exclude "fabric.mod.json"
    exclude "architectury.common.json"

    configurations = [project.configurations.shadowCommon]
    classifier "dev-shadow"
}

remapJar {
    input.set shadowJar.archiveFile
    dependsOn shadowJar
    classifier null
}

jar {
    classifier "dev"
}

sourcesJar {
    def commonSources = project(":common").sourcesJar
    dependsOn commonSources
    from commonSources.archiveFile.map { zipTree(it) }
}

components.java {
    withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
        skip()
    }
}

publishing {
    publications {
        mavenForge(MavenPublication) {
            artifactId = rootProject.archives_base_name + "-" + project.name
            from components.java
        }
    }

    // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
    repositories {
        // Add repositories to publish to here.
    }
}

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

No response

Extra Notes (Optional)

No response

Crash Report

https://gist.github.com/BreadNiceCat/9919a9af367c3197060bb9310f8e7a46

commented

I hava the same issue.

commented

having the same issue here.