Comments (3)
Show me your build.gradle
file.
from curios.
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.
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)
- Curios encountered error during sided setup HOT 1
- Can I still edit how many curios slots there are? HOT 1
- [1.19.x+?] Partially enforced 25-character limit on `ICuriosItemHandler::getCurios` `Map` keys HOT 3
- [1.20.1 Forge] Curios menu does not appear HOT 10
- how dose one make a curio slot not render on the player? HOT 1
- Datapack ordering between mods makes merging weird? HOT 1
- Curios API encountered an error during the sided_setup event phase HOT 2
- Unsupported Operation in Forge 1.20.1
- [Forge 1.20.1] Curios Inventory Keybind does not function as a "leave container inventory" hotkey like with Open Vanilla Inventory.
- [1.20.1] Curios Cosmetics cause glitched curios positionings. HOT 22
- Curious API (curious) encountered an error during the sided_setup event phase HOT 2
- [Feature]: Allow curios integrated "inventory check" support by default. HOT 1
- [Bug]: Crash when modifying HUD positions when using Inventory HUD + & ATM9 HOT 1
- [Bug]: Mixin apply failed curios.mixins.json:AccessorEntity -> net.minecraft.world.entity.Entity: No candidates were found matching f_19803_ HOT 9
- [Bug]: Curios Inventory Keybind exits out of Flux Netowrk text boxes while typing. HOT 2
- [Bug]: crash?? HOT 1
- [Feature]: Add an option in the configuration interface to disable the button for the GUI interface. HOT 1
- [Bug]: item_handler capability is not synced between server and client
- Spongepowered Crash HOT 1
- [Bug]: Doubling items with the keepinventory true command.2 slots for some items and 5 ring slots. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curios.