Controlling

Controlling

236M Downloads

Unable to compile Controlling in my build.gradle file on Forge 1.20.1 47.3.0

Andy608 opened this issue ยท 2 comments

commented

Hello, I'm unable to compile Controlling inside of my build.gradle. When I add the forge jar, the game produces the following error about my mixin file, even though it works fine without it:

Caused by: java.lang.IllegalArgumentException: The specified resource 'easy_backpacks.mixins.json' was invalid or could not be read

I have Controlling setup in my dependencies like so:

    compileOnly fg.deobf("com.blamejared.controlling:Controlling-common-${minecraft_version}:${controlling_version}")
    runtimeOnly fg.deobf("com.blamejared.controlling:Controlling-forge-${minecraft_version}:${controlling_version}")

I'm using forge 47.3.0, am I implementing this correctly?

I've tried using implementation, compileOnly and runtimeOnly, all fail on just the forge one. The common version seems to work fine.

commented

Hey thanks for the quick reply. Looking at the log it says Controlling depends on Searchables. Once I added that dependency in, it fixed the issue.

I only want Controlling for runtime, updated build.gradle looks like this for others that may run into this:

    runtimeOnly fg.deobf("com.blamejared.searchables:Searchables-forge-${minecraft_version}:${searchables_version}")
    runtimeOnly fg.deobf("com.blamejared.controlling:Controlling-forge-${minecraft_version}:${controlling_version}")
commented

If you have a simple forge only project, the only thing you should have in your build.gradle is this:

    runtimeOnly fg.deobf("com.blamejared.controlling:Controlling-forge-${minecraft_version}:${controlling_version}")

the -common- artifact is for MultiLoader development, so unless you are doing that, you don't need it.

If you want to compile against Controlling's APIs, you should replace runtimeOnly with implementation, which will make it available everywhere.

If you still have trouble, please provide your latest.log file and I can take a look at the error.