OptiFabric

OptiFabric

9M Downloads

Optifabric searches for minecraft-1.17.1-client.jar instead of minecraft-client.jar

MartinTintin3 opened this issue ยท 2 comments

commented

So I am making a mod, and I put optifabric + optifine into the run/mods directory. I get this error when trying to build and launch my project in debug mode:

java.lang.AssertionError: Unable to find Minecraft dev jar! Tried /Users/hacker/.gradle/caches/fabric-loom/1.17.1/net.fabricmc.yarn.1_17_1.1.17.1+build.61-v2/minecraft-1.17.1-client.jar and /Users/hacker/.gradle/caches/fabric-loom/1.17.1/minecraft-1.17.1-client.jar
	at me.modmuss50.optifabric.mod.OptifineSetup.getMinecraftJar(OptifineSetup.java:325) ~[46e27870-b3e9-4e56-9a50-e2760ebb78ec.jar:?]
	at me.modmuss50.optifabric.mod.OptifineSetup.getRuntime(OptifineSetup.java:96) ~[46e27870-b3e9-4e56-9a50-e2760ebb78ec.jar:?]
	at me.modmuss50.optifabric.mod.OptifabricSetup.run(OptifabricSetup.java:41) ~[46e27870-b3e9-4e56-9a50-e2760ebb78ec.jar:?]
	... 27 more

As you can see, it's searching for minecraft-1.17.1-client.jar, but if I look into .gradle/caches/fabric-loom/1.17.1/, I can see that all the .jars don't have the version in them, so instead, the .jar that the mod is looking for is called minecraft-client.jar and not minecraft-1.17.1-client.jar. To check if this is correct, I made a symlink to minecraft-client.jar called minecraft-1.17.1-client.jar, and indeed when I did that, the client launched correctly.

I think maybe to solve this, you could also check for minecraft-client.jar and not only minecraft-1.17.1-client.jar when finding the dev jar?

commented

Did you close it cause it's fixed now?

commented

Yes it should be. Please do re-open if you're still having issues.