Workspace Setup - apace100/origins-fabric GitHub Wiki
So, you want to create an Origins add-on? Nice.
Before you start, let me just say that I assume you have worked with Fabric before in some capacity and have at least general programming knowledge. I'm not going to explain every necessary Java concept here, but focus on what Origins does and how you can add your own features.
To begin developing an add-on, you need to set up your workspace. The first step is setting it up like any other Fabric modding workspace, outlined here: https://fabricmc.net/wiki/tutorial:setup
Once that's done, you should be able to add Origins to your gradle build script, so that the workspace automatically downloads the mod. In your build.gradle
file, add the following Maven repositories if you don't have them already:
repositories {
maven {
url 'https://jitpack.io'
}
maven {
name = "AdrianTodt's Maven"
url = "https://dl.bintray.com/adriantodt/maven"
}
maven {
url "https://maven.jamieswhiteshirt.com/libs-release/"
}
maven {
url "https://maven.shedaniel.me/"
}
}
Note: this block goes into the file directly (at the top level); do not add JitPack to the publishing { repositories { ... } }
you see at the bottom of your build.gradle
.
Once you did this, you also need to add this line to your dependencies
block:
modImplementation "com.github.apace100:origins-fabric:${project.origins_version}"
The ${project.origins_version}
is a variable which will be taken from gradle.properties
. It's just a neat way to set things up, so you don't have to mess with your build.gradle
every time you want to update a mod. Theoretically, you could just add the version directly in the build.gradle
. However, to define the variable, open up your gradle.properties
file and add a line which looks like this:
origins_version=v0.4.0
Replace v0.4.0
with the version of Origins you want to use. Usually, using the latest version is recommended. You can find the version numbers here: https://github.com/apace100/origins-fabric/releases
That's it! If you refresh gradle, Origins should be included in your project. Hooray!