Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1.15.2 (and later) - libs folder for obfuscated jars

Recommended Posts

Hey, guys and gals!


In times of 1.12.2 there was a possibility to put normal obfuscated mod jar file in ./libs directory to make its classes accessible within dev environment. In recent versions however, that doesn't work. Yes, I know that I can (and probably should) use maven dependencies to load deobf versions of needed mods, but what to do if I want to use mod, whose maven repository doesn't exist?

I've tried to use "compile fileTree(include: ['*.jar'], dir: 'libs')" which allows IDEA to see the internals of jars inside "libs" directory, but I cannot run the mod due to obfuscated names in jars, the same with local "flatDir" repo. Is it possible now at all?


Link to post
Share on other sites


compile fg.deobf("blank:filename:fileversion")

should do what you need.

Make sure the libs/ is added as a flatDir repo.


The blank is needed, but it is ignored. Filename and fileversion are both taken from the actual name of the file, made by turning the last "-" character into a ":" - this usually means the typical "modid-1.15.2-1.0.jar" file becomes "blank:modid-1.15.2:1.0".


This creates a maven coordinate, which ForgeGradle uses to find the file.

It will likely not work without this.

Edited by Curle
  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.