Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

140M Downloads

(Eclipse dev environment)Error on loading

NightmareTwilight opened this issue · 25 comments

commented

While trying to load curios v0.10 on eclipse I get an error during the load_registries event phase, field_78040_i, to be specific. this is with Forge 25.0.141. I also tried with regular minecraft launcher, which got no errors.

log:
latest.log

commented

Wait, all of those at once? The buildscript and the mods.toml are fine (except double-check it because you made a typo, it's top.theillusivec4.curios), but don't put it in the run folder.

commented

How are you adding it to your workspace? List your steps.

commented

In the run/mods, referenced in mods.toml as well as in build.gradle

deobf 'top.theillusivec2.curios:curios:1.13.2-0.10'

No other mods are used.

commented

The thing is that it says it’s not installed otherwise, though I’m not sure why.
Happened when I updated to 0.10
I’ll check if it has to do with the typo as soon as I can, probably tomorrow.

commented

The thing is that it says it’s not installed otherwise

Then something's wrong with your workspace. Try regenerating your run configurations, or even rebuilding your workspace entirely. I've made 3 different mods using Curios 0.10 so I know for a fact that it does work without needing to put it in your run folder.

commented

I have the same error when starting in eclipse. I'm using forge 191 and i did compile "top.theillusivec4.curios:curios:${version_curios}" because it wouldn't do the deobf.

I just tried again and this is what happens on deobf

Could not resolve: top.theillusivec4.curios:curios:1.13.2-0.10
Could not resolve: top.theillusivec4.curios:curios:1.13.2-0.10_mapped_snapshot_20180921-1.13

I'm unsure if this is my problem or yours, but i'll post anyways.

https://hastebin.com/afezagosoh.rb

commented

@RobertSkalko Can you post your build.gradle file?

commented

Why just the gradle, here's a whole project

https://github.com/RobertSkalko/Mine-and-Slash-1.13

commented

I'm still testing things on my end, but I think some things got updated in ForgeGradle that I didn't know about. Try using compile fg.deobf("top.theillusivec4.curios:curios:${version_curios}") instead.

I also think dependency management in general is a little bugged in Forge right now, so it's hard to tell what's what.

commented

same thing, could not resolve

https://hastebin.com/upogaxoqil.js

commented

Hm, strange, it resolves fine on my end.

commented

This time it worked when i removed that as you said

repositories {
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
}

dependencies {
/* minecraft dependency is here */

// compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-${version_minecraft}:5.0.0.20:api")
// at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-${version_minecraft}:5.0.0.20")
}

I then changed the jei to your curios like compileOnly fg.deobf("top.theillusivec4.curios:curios:${version_curios}") and it once again could not resolve

commented

Can you try using this build.gradle: https://gist.github.com/TheIllusiveC4/c54721874bc285333c39ef9567c531a9

It's the same one from your project but I've removed all other dependencies and repositories except for Curios and this makes it resolve for me. It's obviously not really a solution, but I'm interested to see if this makes it work for you.

commented

Apparently it works like that

commented

Then my best guess is that ForgeGradle is having a hard time deobfuscating multiple repositories for some reason, which is why trimming it down to only one works. Unfortunately this would mean that a proper resolution is out of both of our hands until that's fixed.

commented

i just tried adding my other deps back in and it seems to work too.. This makes 0 sense to me but thanks at least it works now. Though eclipse still won't run the dam project and gives java.lang.IllegalStateException: Duplicate key net.minecraftforge.fml.loading.moddiscovery.ModFileInfo@70e29e14 but i don't think that's your problem. Sorry about the bother!

commented

Welp, i just deleted gradle cache and ran again and it now doesn't work again. Can you please get another person to try it? Now after re-running with your mod on compile instead of compile deobf thing it once again errors with field_78040_i in eclipse debug run.

commented

I'm honestly pretty stumped here, since I can't find anything that should be wrong. It seems like that last error is due to not being able to find the version number, but that should be a valid number. And I don't have enough expertise in Gradle to parse it any deeper. Can you try adding another dependency, like JEI? Just to figure out if it's just Curios for some reason or it's all dependencies.

commented

post some deobf deps if you want me to test them. I tried jei and it didn't work but i'm not sure if it's cus i fked up

dependencies { compileOnly fg.deobf("mezz.jei:jei-${version_minecraft}:5.0.0.18:api") runtimeOnly fg.deobf("mezz.jei:jei-${version_minecraft}:5.0.0.18") }

(along with copy pasted maven)

commented

Using those exact lines of code, I'm able to resolve the dependencies, so I think it's something on your end (but I'm not sure what the issue could be). Note that there was some weirdness going on with the "https://modmaven.k-4u.nl" fallback maven for JEI so I had to remove that first and keep only the primary repo to get it working on my end.

commented

@RobertSkalko
With the new 0.11 update, I've also published the deobfuscated jar using the 20190428-1.13.2 mappings. You just have to use compile "top.theillusivec4.curios:curios:1.13.2-0.11:deobf" and it should at least resolve correctly. If it errors again at runtime, just make sure the mappings match.

commented

thanks that seems to work! i'll have to first fix the forge's java.lang.IllegalStateException: Duplicate key error before i can test it in IDE. think i'll try switching to intelij cus i heard it has less errors. I'll report if it runs in IDE or not but i assume it should

commented

Just imported it in intelij and it works! no more field error.

commented

Are you able to get it working again if you do what I did before and remove the other dependencies/repositories? It's possible that deleting the gradle cache forced it to collect all of the files again which it might have a hard time doing correctly with multiple dependencies/repositories present.

I'll see if I can get someone else to test it.

compile instead of compile deobf thing it once again errors with field_78040_i

This will be an issue with other mods as well, not just mine. Forge currently sometimes doesn't load obfuscated mods correctly in a dev environment. I've tried many times myself with other mods.

commented

Closing this since a resolution has seemingly been reached. An overall rundown to those experiencing similar issues:

At this time, ForgeGradle dependency management is a little bugged. compile fg.deobf("top.theillusivec4.curios:curios:${version_curios}" is the technically recommended way, but it looks like it doesn't work all the time. If it doesn't work, use compile "top.theillusivec4.curios:curios:${version_curios}:deobf" until that gets sorted out.