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

How to create a jar file, that can be included as dependency in another project?

Recommended Posts

I've posted my question already, but I still don't know what to do.

I have a mod finished (lets call it mod A), which I want to distribute via mavenCentral so other devs can use its API. Before I upload the jar I would like to test it locally with another mod (mod B). Thats why I have this in the build.gradle file of mod B:

dependencies {
    minecraft "net.minecraftforge:forge:${version_forge}"
	implementation fg.deobf(files('C:/Minecraft Modding/ElementalCombat/build/libs/elementalcombat-forge-1.16.5-1.1.1.jar'))

This will import the jar into the project succesfully. However when I try to run mod B mod A will run into a FieldNotFound exception in its init phase. The field from the exception has an obfuscated name, which it didn't had before building the jar. So my best guess is, that something went wrong when (de-)obfuscating the jar. But I don't know how I can fix this.

My repositories can be found here:
https://github.com/Tavi007/ElementalCombat (aka mod A)
https://github.com/Tavi007/ElementalCombat-Weaponry (aka mod B)

The line, that causes the exception:

I really hope, someone can help me. This is the last issue, that I need to fix, before I can release my mod :)

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.