apace100 / origins-fabric

MIT License
176 stars 173 forks source link

cannot build a mod #619

Open AltAccountForNobody opened 1 year ago

AltAccountForNobody commented 1 year ago

whenever I try and compile a mod on IntelliJ Idea it throws this error and I can't figure out how to fix it. A problem occurred configuring root project 'origins-master'.

Could not resolve all dependencies for configuration ':modImplementation'. Could not find com.github.DaFuqs:AdditionalEntityAttributes:95f13798d1. Searched in the following locations:

Possible solution:

Provismet commented 1 year ago

I am also having this exact problem recently; the AdditionalEntityAttritbutes cannot be resolved for whatever reason. This problem appears to be new as a previous project of mine succeeded in getting the dependency cached.
The jitpack build.log for this version of the dependency states that the build failed.

NickSuttonDicken commented 1 year ago

Also having the exact same problem

eggohito commented 1 year ago

Currently, Origins is failing to build due to the version of one of the embedded libraries that it uses, Additional Entity Attributes, which has failed to build due to it using the wrong JDK version. Here's a temporary fix for the issue:

In the build.gradle file of your project, you will have to replace "com.github.apace100:origins-fabric:${project.origins_version}" with "com.github.eggohito:origins-fabric:${project.origins_version}" to use my fork, which uses a different version of Additional Entity Attributes:

dependencies {
    // ...
    modImplementation "com.github.eggohito:origins-fabric:${project.origins_version}"
    // ...
}
EDIT: As of 1/15/2023, there is no need to use a specific commit hash for using a specific version as a dependency. You can use semantic versions normally, like 1.6.2 or 1.7.1
> Then, in the `gradle.properties` file of your project, you will have to replace the value of the `origins_version` field to either `00c0a88` *(for Origins 1.7.1)* or `c4a35b7` *(for Origins 1.6.2).* These are the commit hashes that has the fix for the issue with Additional Entity Attributes: > ```properties > # ... > origins_version=00c0a88 > # ... ```
MerchantPug commented 1 year ago

Holy shit thanks eggo, I was going to do this myself but you've saved me a ton of time.

eggohito commented 1 year ago

Currently, Origins is failing to build due to the version of one of the embedded libraries that it uses, Additional Entity Attributes, which has failed to build due to it using the wrong JDK version. Here's a temporary fix for the issue:

In the build.gradle file of your project, you will have to replace "com.github.apace100:origins-fabric:${project.origins_version}" with "com.github.eggohito:origins-fabric:${project.origins_version}" to use my fork, which uses a different version of Additional Entity Attributes:

dependencies {
    // ...
    modImplementation "com.github.eggohito:origins-fabric:${project.origins_version}"
    // ...
}

EDIT: As of 1/15/2023, there is no need to use a specific commit hash for using a specific version as a dependency. You can use semantic versions normally, like 1.6.2 or 1.7.1

I've now released the artifacts in my forks and updated my previous message

JadeJuno commented 1 year ago

Shouldn't this issue be closed?

MerchantPug commented 1 year ago

It should, but v1.8.1 is broken now, so I'm going to take this opportunity to say that I have a working fork for Apoli and Origins for that.

Again, it's Additional Entity Attributes' specific version used within the Origins Fabric JitPack upload, this issue should no longer occur as AEA is now using the built-in JitPack method for getting Java 17.

If you're on a 1.19.3 workspace, to get the latest version of Origins, replace "com.github.apace100:origins-fabric:${project.origins_version}" with "com.github.MerchantPug:origins-fabric:${project.origins_version}" Replace origins-fabric with apoli for Apoli.

As with eggo's fork, you are able to keep the release tag for the version.

eggohito commented 1 year ago

It looks like there's an issue with Calio too, where the 457eb92 build couldn't be found in JitPack even though you can manually download it :thinking: I've updated my forks to fix this issue by using a different version of Calio (1.9.0) and the Additional Entity Attributes issue by using Pug's fork of Additional Entity Attributes