Patchouli (Fabric/Quilt)

Patchouli (Fabric/Quilt)

25M Downloads

Compilation failed

Ideki opened this issue ยท 3 comments

commented

Mod loader

Forge

Minecraft version

1.18.2

Patchouli version

1.18.2-66-SNAPSHOT

Modloader version

forge:1.18.2-40.0.15

Modpack info

No response

The latest.log file

https://pastebin.com/T0RAwUsd

Issue description

I am trying to use use Patchouli to make a book.
I tried to copy the settings from Botania for gradle.
I followed the instructions from Getting Started.
But I guess some steps are missing.
Do I have to download Patchouli if I am using the maven ?

Each time I am compiling my mod I get the following error:

[11:03:50] [main/FATAL] [mixin/]: Mixin apply failed patchouli_xplat.mixins.json:client.AccessorScreen -> net.minecraft.client.gui.screens.Screen: org.spongepowered.asm.mixin.gen.throwables.InvalidAccessorException No candidates were found matching f_169369_:Ljava/util/List; in net/minecraft/client/gui/screens/Screen for patchouli_xplat.mixins.json:client.AccessorScreen->@Accessor[FIELD_GETTER]::getRenderables()Ljava/util/List; [INJECT Applicator Phase -> patchouli_xplat.mixins.json:client.AccessorScreen -> Apply Accessors ->  -> Locate -> patchouli_xplat.mixins.json:client.AccessorScreen->@Accessor[FIELD_GETTER]::getRenderables()Ljava/util/List;]
org.spongepowered.asm.mixin.gen.throwables.InvalidAccessorException: No candidates were found matching f_169369_:Ljava/util/List; in net/minecraft/client/gui/screens/Screen for patchouli_xplat.mixins.json:client.AccessorScreen->@Accessor[FIELD_GETTER]::getRenderables()Ljava/util/List; [INJECT Applicator Phase -> patchouli_xplat.mixins.json:client.AccessorScreen -> Apply Accessors ->  -> Locate -> patchouli_xplat.mixins.json:client.AccessorScreen->@Accessor[FIELD_GETTER]::getRenderables()Ljava/util/List;]
	at

This is my build.gradle

buildscript {
    repositories {
        maven { url = 'https://maven.minecraftforge.net' }

        mavenCentral()
    }
    
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
    }
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0'
group = 'com.ideki.test_mod'
archivesBaseName = 'test_mod'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
    mappings channel: 'official', version: '1.18.2'

    accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
    
    runs {
        client {
            workingDirectory project.file('run')

            mods {
                test_mod {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')

            mods {
                test_mod {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')

            args '--mod', archivesBaseName, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

            mods {
                test_mod {
                    source sourceSets.main
                }
            }
        }
    }
}

sourceSets.main.resources { srcDir 'src/generated/resources' }

repositories {

    maven { url 'https://maven.blamejared.com' }
}

dependencies {
    minecraft 'net.minecraftforge:forge:1.18.2-40.0.15'

    compileOnly "vazkii.patchouli:Patchouli-xplat:1.18.2-66-SNAPSHOT"
    implementation fg.deobf("vazkii.patchouli:Patchouli:1.18.2-66-SNAPSHOT")
}

jar {
    manifest {
        attributes([
                "Specification-Title"     : "test_mod",
                "Specification-Vendor"    : "Ideki",
                "Specification-Version"   : "1",
                "Implementation-Title"    : project.name,
                "Implementation-Version"  : project.jar.archiveVersion,
                "Implementation-Vendor"   : "Ideki",
                "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
        ])
    }
}

jar.finalizedBy('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file://${project.projectDir}/mcmodsrepo"
        }
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

Steps to reproduce

No response

Other information

No response

commented

see https://github.com/VazkiiMods/Patchouli#mixin-troubleshooting-forge-only

I added the following lines to my build.gradle
But the same exception occurs

            property 'mixin.env.remapRefMap', 'true'
            property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
commented

Just to be sure:
To add Patchouli to my mod, I only need to add the following lines to build.gradle:

    compileOnly "vazkii.patchouli:Patchouli-xplat:1.18.2-66-SNAPSHOT"
    implementation fg.deobf("vazkii.patchouli:Patchouli:1.18.2-66-SNAPSHOT")

and

            property 'mixin.env.remapRefMap', 'true'
            property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"

I don't need to download anything.

Right ?