Jump to content

Can't Figure out how to Add Dependency Mod


xlea99

Recommended Posts

Hi all. For the past week, I've been trying to add some dependencies to a small mod I'm trying to make. I've read every tutorial, watched every video I can find, but obviously I'm doing something completely wrong.

 

I'm trying to make a small 1.15.2 modpack, probably only for personal use. I'm using the mod Silent Gems, by silentchaos512, which adds in a huge amount of gem ores to the game. For immersion purposes, I wanted to add in some extra variations of those ores to spawn in other blocks, like sandstone, diorite, granite, etc. Literally all I'm trying to do is add some new ores to the game, with a custom texture, that drops a gem item from Silent Gems.

 

Well, I've succeeded in making the blocks themselves, and the textures. The only thing I need to do is add the items from Silent Gems into their loot table. That's it. But no matter what I try, I can't add Silent Gems (and Silent Lib, another dependency) as dependencies for my own mod. I'm not trying to learn forge, I'm not trying to enter the modding scene, I'm literally trying to add a few blocks to my game for leisure purposes, and given all the existing addon mods out there, this seems like something that's not difficult to do.

 

Any help would be greatly appreciated. Thanks a bunch!

 

 

Edit:

 

I should add in the things that I've tried to do so far.

 

So I tried using Silent Lib's maven repository as a repository in my build.gradle:

repositories {
    jcenter()

    maven {url  "https://dl.bintray.com/silentchaos512/silent-lib"}
}

dependencies {
    minecraft 'net.minecraftforge:forge:1.15.2-31.2.37'

    compile fg.deobf("net.silentchaos512:silent-lib-${mc_version}:${silent_lib_version}") {
        exclude module: "forge"
    }


}

 

This is a verbatim copy of the code found in the source build.gradle of the actual Silent Gems mod. Yet, when I try to do this, IntelliJ says:

Could not resolve all files for configuration ':compileClasspath'.
> Could not find net.silentchaos512:silent-lib-1.15.2:4.6.6_mapped_snapshot_20200514-1.15.1.
  Searched in the following locations:
    - https://jcenter.bintray.com/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.pom
    - https://jcenter.bintray.com/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.jar
    - https://dl.bintray.com/silentchaos512/silent-lib/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.pom
    - https://dl.bintray.com/silentchaos512/silent-lib/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.jar
    - https://files.minecraftforge.net/maven/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.pom
    - https://files.minecraftforge.net/maven/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.jar
    - file:/C:/Users/timbe/.gradle/caches/forge_gradle/bundeled_repo/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.pom
    - file:/C:/Users/timbe/.gradle/caches/forge_gradle/bundeled_repo/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.jar
    - https://libraries.minecraft.net/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.jar
    - https://repo.maven.apache.org/maven2/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.pom
    - https://repo.maven.apache.org/maven2/net/silentchaos512/silent-lib-1.15.2/4.6.6_mapped_snapshot_20200514-1.15.1/silent-lib-1.15.2-4.6.6_mapped_snapshot_20200514-1.15.1.jar
  Required by:
      project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Which is also weird because I never specified anything to do with "4.6.6_mapped_snapshot_20200514-1.15.1". I have no idea where it's getting that text and information from.

 

 

 

 

So, I thought that maybe it was just a problem when trying to use that mod as a dependency. So, I decided to try add JEI as a dependency instead, since there was an actual tutorial on how to do so. I copied the code directly from the tutorial on the JEI Wiki Entry into IntelliJ, so my build.gradle now includes this:

repositories {
    maven {
        // location of the maven that hosts JEI files
        name = "Progwml6 maven"
        url = "https://dvs1.progwml6.com/files/maven/"
    }
    maven {
        // location of a maven mirror for JEI files, as a fallback
        name = "ModMaven"
        url = "https://modmaven.k-4u.nl"
    }
}


dependencies {
    minecraft 'net.minecraftforge:forge:1.15.2-31.2.37'



    // compile against the JEI API but do not include it at runtime
    compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api")
    // at runtime, use the full JEI jar
    runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}")
}

 

But, when I try to run it, I get a similar message:

Could not resolve all files for configuration ':compileClasspath'.
> Could not find mezz.jei:jei-1.15.2:3.13.0.330_mapped_snapshot_20200514-1.15.1.
  Searched in the following locations:
    - https://dvs1.progwml6.com/files/maven/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1.pom
    - https://dvs1.progwml6.com/files/maven/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1-api.jar
    - https://modmaven.k-4u.nl/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1.pom
    - https://modmaven.k-4u.nl/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1-api.jar
    - https://files.minecraftforge.net/maven/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1.pom
    - https://files.minecraftforge.net/maven/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1-api.jar
    - file:/C:/Users/timbe/.gradle/caches/forge_gradle/bundeled_repo/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1.pom
    - file:/C:/Users/timbe/.gradle/caches/forge_gradle/bundeled_repo/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1-api.jar
    - https://libraries.minecraft.net/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1-api.jar
    - https://repo.maven.apache.org/maven2/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1.pom
    - https://repo.maven.apache.org/maven2/mezz/jei/jei-1.15.2/3.13.0.330_mapped_snapshot_20200514-1.15.1/jei-1.15.2-3.13.0.330_mapped_snapshot_20200514-1.15.1-api.jar
  Required by:
      project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

 

I hope this helps with diagnosing the issue.

Edited by xlea99
Link to comment
Share on other sites

Well looking at gradle docs and the forge docs is always a good start.

22 minutes ago, xlea99 said:

I'm not trying to learn forge

That's fine, still need to know java though to get it working.

23 minutes ago, xlea99 said:

I wanted to add in some extra variations of those ores to spawn in other blocks, like sandstone, diorite, granite, etc

This part makes it sound like less like an actual mod and more like just modifying a vanilla loot table. So, you're probably going overkill making a mod when all that's needed is probably a datapack.

Link to comment
Share on other sites

1 minute ago, ChampionAsh5357 said:

Well looking at gradle docs and the forge docs is always a good start.

I tried looking at the forge docs, but I just couldn't make sense of a lot of what they were saying. It seemed like you had to have a solid understanding of forge modding to understand what the process was.

 

2 minutes ago, ChampionAsh5357 said:

That's fine, still need to know java though to get it working.

.Yeah, I know a little Java, I'm a lot more comfortable with C++ and python though. I know enough to slowly work my way through things, but usually with the help of many stack overflow and "learn java" tabs open.

 

4 minutes ago, ChampionAsh5357 said:

This part makes it sound like less like an actual mod and more like just modifying a vanilla loot table. So, you're probably going overkill making a mod when all that's needed is probably a datapack.

Originally I wanted to use a datapack, but unfortunately you can't (to my knowledge) add in new blocks using datapacks. Would it be possible to add the blocks through a forge mod, then modify their loot tables using a datapack to connect them with the items I want them to drop?

Link to comment
Share on other sites

13 minutes ago, xlea99 said:

It seemed like you had to have a solid understanding of forge modding to understand what the process was.

Nope, just understand toml and comments. No forge modding understanding required. Although I have been programming in Forge correctly for a while now, it still is not necessary. However, your issue more relies on reading the gradle documentation. The forge docs was only to add the dependency block that says "hey, i require this to load".

15 minutes ago, xlea99 said:

Would it be possible to add the blocks through a forge mod, then modify their loot tables using a datapack to connect them with the items I want them to drop?

That's exactly what you're supposed to do.

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.



×
×
  • Create New...

Important Information

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