TheIllusiveC4 / Curios

Minecraft Mod: A flexible and expandable accessory/equipment API for users and developers.
https://www.curseforge.com/minecraft/mc-mods/curios
Other
189 stars 72 forks source link

(Eclipse dev environment)Error on loading #5

Closed NightmareTwilight closed 5 years ago

NightmareTwilight commented 5 years ago

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

TheIllusiveC4 commented 5 years ago

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

NightmareTwilight commented 5 years ago

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.

TheIllusiveC4 commented 5 years ago

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.

CrimsonTyphon commented 5 years ago

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.

TheIllusiveC4 commented 5 years ago

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.

RobertSkalko commented 5 years ago

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

TheIllusiveC4 commented 5 years ago

@RobertSkalko Can you post your build.gradle file?

RobertSkalko commented 5 years ago

Why just the gradle, here's a whole project

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

TheIllusiveC4 commented 5 years ago

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.

RobertSkalko commented 5 years ago

same thing, could not resolve

https://hastebin.com/upogaxoqil.js

TheIllusiveC4 commented 5 years ago

Hm, strange, it resolves fine on my end.

TheIllusiveC4 commented 5 years ago

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.

RobertSkalko commented 5 years ago

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)

TheIllusiveC4 commented 5 years ago

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.

RobertSkalko commented 5 years ago

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

TheIllusiveC4 commented 5 years ago

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.

RobertSkalko commented 5 years ago

Apparently it works like that

TheIllusiveC4 commented 5 years ago

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.

RobertSkalko commented 5 years ago

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!

RobertSkalko commented 5 years ago

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.

TheIllusiveC4 commented 5 years ago

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.

TheIllusiveC4 commented 5 years ago

@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.

RobertSkalko commented 5 years ago

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

RobertSkalko commented 5 years ago

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

TheIllusiveC4 commented 5 years ago

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.