Jump to content

[1.12] How do I do mod dependencies?


TheGoldenProof

Recommended Posts

Not really sure how any of this dependency stuff works but I kind of have an idea. My build.gradle doesn't have a "jar" section, so do I add it my self? Where is /META-INF? I don't understand what this maven stuff is and a have a very vague understanding of what a repository is from submitting bug reports on git. I think the .meta file is just a manifest file, and forge will use the .meta files if the jar doesn't have one. It gets the groupId:artifactId:version thing so it can be archived. What does that mean? I have the jar file that I want to use as a dependency and i looked in its META-INF folder and looked at its MANIFEST.MF file and all it said was "Manifest-Version: 1.0" Does that mean that it was a poorly made mod and what do I do about it? Do i give it a custom maven coordinate (Is that what the groupId:... thing is called?)? I'm not sure where I go from here.

 

Also, if  when I successfully do this dependency extraction thing, it adds the mod to minecraft but not the mods folder, correct? How to I use the mod its dependent on while making my mod? I saw that you make a folder called libs and put it in there and do some build path thing to access its code, but will that add it to the client when i run it in eclipse or do I have to add it to the run/mods folder?

 

I tried to put all of my questions into one post as much as possible but I'm bound to have more.

 

This was originally here but I was told to put it into a new post

Edited by TheGoldenProof
Link to comment
Share on other sites

Thanks for making a new thread!

I don’t have that much experience with gradle, but I believe that META-INF is part of your compiled mod. I think that currently it is only used for access-transformers and core-mods, but I believe that the entire mod metadata (currently in mcmod.info) is going to be moved into it.

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

META-INF file is used for ATs, doesn't have to do anything with Maven.

If you're using IntelliJ just add the .jar files to the libs folder and it will work, you will probably have to refresh gradle by using that button in gradle module,

If you're using Eclipse you have to add something to your gradle.build file for it to work

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar']) // For all .jar files in folder
    compile files('libs/file_name.jar') // For one .jar file in folder
}

The mod will be ran with the client too, adding it again to the mods folder will just cause a duplicate mods error.

 

NOTE: Make sure to use deobfuscated jar files.

Edited by Terrails
Link to comment
Share on other sites

so the {addedMod}.meta would be the manifest for the new mod. where is the manifest for my mod?

and where does the {addedMod}.meta go? src/main/resources

 

i dont really know what a manifest is still and dont understand how to make one and how to give it maven coordinates.

 

EDIT

kind of figuring things out. Once I make my jar file, I have to open it and edit the MANIFEST.MF in /META-INF and put 

jar {
    manifest {
        attributes("Implementation-Title": "Gradle",
                   "Implementation-Version": version,
					"ContainedDeps": "name of jar file in /META_INF/libraries",)
    }
}

and then in the mods {addedMod}.meta I put

jar {
    manifest {
        attributes("Implementation-Title": "Gradle",
                   "Implementation-Version": version,
				   "Maven-Artifact": "Maven artifact name thing")
    }
}

 

the part im confused about:

did Terrails say that i can just put 

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar']) // For all .jar files in folder
    compile files('libs/file_name.jar') // For one .jar file in folder
}

into my build.gradle and it will also do what im trying to do without any of this manifest stuff?

 

ANOTHER EDIT

Couldn't figure out how to do it and i finally got the manifest to have the properties in it but minecraft immediately crashed saying that the mod wasnt there. I forgot to put it in. I extracted the jar and put it in and zipped and renamed it, minecraft couldn't read it. Finally, i realized that 7zip lets you create folders and add files to an archive without having to extract it first and now it all works.

 

Thanks for the help :)

Edited by TheGoldenProof
Link to comment
Share on other sites

Can you mark your topic as solved and post your final solution for future people please?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

 

Hello I have some problems with the dependencies, I do not understand what must be put exactly in the build.gradle I put the mod with which I want to work (Immersive Engineering) in build / libs and I added that in the build.gradle:

 

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar']) // For all .jar files in folder
    compile files('libs/file_name.jar') // For one .jar file in folder
}

 

But once that is done then the command "gradlew setupDecompWorkspace" the mod is not added in the workspace once the project launched with Eclipse.

Link to comment
Share on other sites

This topic is about putting dependencies inside your finished mod and has nothing to do with your problem. Please create your own topic and include the version your are writing your mod for. You shouldn't need any of that in your build.gradle, everything from /libs/ is added automatically.

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

26 minutes ago, Cadiboo said:

This topic is about putting dependencies inside your finished mod and has nothing to do with your problem. Please create your own topic and include the version your are writing your mod for. You shouldn't need any of that in your build.gradle, everything from /libs/ is added automatically.

 

Excuse me this is the first time I ask for help on MinecraftForge forums thank you very much

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I was just trying to play my modded world when i randomly got this crash for no reason. I sorted through like every mod and eventually I realized it was LLibrary but I can't seem to find a solution to fix the crashing. I can't lose the world that I have that uses this mod please help me. Here's the report: https://pastebin.com/0D00B79i If anyone has a solution please let me know.  
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Ligawin88 adalah bocoran slot rekomendasi gacor dari Ligawin88 yang bisa anda temukan di SLOT Ligawin88. Situs SLOT Ligawin88 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Ligawin88 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Ligawin88 merupakan SLOT Ligawin88 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Ligawin88. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Ligawin88 hari ini yang telah disediakan SLOT Ligawin88. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Ligawin88 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Ligawin88 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Ligawin88 di link SLOT Ligawin88.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Asusslot adalah bocoran slot rekomendasi gacor dari Asusslot yang bisa anda temukan di SLOT Asusslot. Situs SLOT Asusslot hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Asusslot terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Asusslot merupakan SLOT Asusslot hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Asusslot. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Asusslot hari ini yang telah disediakan SLOT Asusslot. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Asusslot terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Asusslot terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Asusslot di link SLOT Asusslot.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Galeri555 adalah bocoran slot rekomendasi gacor dari Galeri555 yang bisa anda temukan di SLOT Galeri555. Situs SLOT Galeri555 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Galeri555 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Galeri555 merupakan SLOT Galeri555 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Galeri555. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Galeri555 hari ini yang telah disediakan SLOT Galeri555. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Galeri555 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Galeri555 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Galeri555 di link SLOT Galeri555.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Kocok303 adalah bocoran slot rekomendasi gacor dari Kocok303 yang bisa anda temukan di SLOT Kocok303. Situs SLOT Kocok303 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Kocok303 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Kocok303 merupakan SLOT Kocok303 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Kocok303. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Kocok303 hari ini yang telah disediakan SLOT Kocok303. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Kocok303 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Kocok303 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Kocok303 di link SLOT Kocok303.
  • Topics

×
×
  • Create New...

Important Information

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