Jump to content

[1.16.4]Starting with secondary Mod from Eclipse


Cratthorax

Recommended Posts

Good day,

I'm trying to get a second mod running from inside the run/mods folder, when ever I would test my current project.

For one I'm trying to make my current project based on one of my library's, second, since I would spawn an awful lot of new blocks during world creation, I would use a X-Ray mod in the past, in order to quickly verify my ore spawn is actually working.

Unfortunately I can't get any of the already compiled mods running from inside the run/mods folder. I remember this was perfectly possible in the past.

Link to comment
Share on other sites

This is done by adding them as a dependency in your build.gradle file

Add this above dependencies:

repositories {
    maven {
        url "https://www.cursemaven.com"
    }
}

Then in dependencies add:

runtimeOnly fg.deobf("curse.maven:custom_name-project_id:file_id")

Replace custom_name with any name you want (I'd recommend just the mod namespace).

Replace project_id with the Project ID over on CurseForge.

Replace the file_id with the id of the mod file.

Read more explanation below.

 

An example of my dependencies, which adds the AttributeFix mod (https://www.curseforge.com/minecraft/mc-mods/attributefix

dependencies {
    implementation 'org.jetbrains:annotations:20.1.0'
    minecraft 'net.minecraftforge:forge:1.16.5-36.2.6'

    runtimeOnly fg.deobf("curse.maven:attributefix-280510:3232225") //AttributeFix Mod
}

 

The project ID can be found on CurseForge's main mod page of the mod you'd like to add

The file ID can be found by clicking the file, it will be the last digits in the URL.

E.g. for AttributeFix-1.16.5-10.1.2.jar the URL is: https://www.curseforge.com/minecraft/mc-mods/attributefix/files/3232225

In this case the file ID = 3232225

 

Be sure to refresh your gradle build before running the client, so the changes are actually applied.

Edited by Leronus
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.