Giter Site home page Giter Site logo

Plea for help about curios HOT 3 CLOSED

theillusivec4 avatar theillusivec4 commented on August 19, 2024
Plea for help

from curios.

Comments (3)

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

Show me your build.gradle file.

from curios.

Aizistral avatar Aizistral commented on August 19, 2024

I've actually managed to get it to work after another hour of tortures yesterday - by reading through this issue and copying few strings from the build.gradle file you fixed for the guy there.
But I don't quite understand how it works, nor I know how to add dependency on a specific jar file on my hard drive rather than adding a repositories and specifying packages and versions. I know it's not your job or something, but I would really appreciate an understandable explanation and/or a working example I could follow.

Here is the build.gradle: Click

from curios.

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

So, I'll try to explain it the best I can from the top, so apologies if you know some of this already. If you want to add a dependency, there are a few ways to do it.

One way is through repositories. These can be local or remote, but you'll generally probably be dealing with remote repositories. These will require you to put a repository code block in your build.gradle, like so:

repositories {
}

Of course, that's just empty, it's not going to do anything. You need to specify which repositories you want to add, that way Gradle will know where to try and look for the files that you want. So, in this case, the Curios file exists in the https://maven.theillusivec4.top/ repository. You can browse through it in your browser to verify. Now you just add that url to your repository block, like so:

repositories {
    maven {
        url = "https://maven.theillusivec4.top/"
    }
}

This will add the specified url as a maven repository to our repositories, which is what we want since we want to look for Curios there. For any dependency you want to add from a maven repository, you'll need to find the appropriate maven url.

Next step, actually finding it. This is where we need to declare a dependency on Curios, so that gradle knows to try and look for it. We need to place that in the dependencies code block in our build.gradle, like so:

dependencies {
	minecraft 'net.minecraftforge:forge:1.14.4-28.0.24'
        compile fg.deobf('top.theillusivec4.curios:curios:FORGE-1.14.4-0.18')
}

Let's parse that out a bit. compile just tells Gradle that you'll need this dependency at compilation time. fg.deobf is a fairly new way of basically declaring that you want to deobfuscate the jar, which is necessary in order to re-map obfuscated jars to your particular mappings.

As far as the package naming goes, you can read about the naming scheme here. It's split up into group:artifactId:version. In Curios's case, it's:

  • group: top.theillusivec4.curios
  • artifactId: curios
  • version: FORGE-1.14.4-0.18

I don't have a lot of experience with adding local files, I tend to use remote repositories as much as I can. I believe the syntax would be something like compile fg.deobf(files([FILENAME])), but don't quote me on that.

That's basically the gist of it. If you'd like working examples of mods that implement Curios, feel free to explore the source code of some of my other mods:

from curios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.