Developing an Addon - Randores/Randores2 GitHub Wiki
Just a quick note: on any addon development tutorial page, you can scroll all the way to the bottom to reach the next and/or previous topics
Introduction
Before you start developing a Randores addon, understand this: this tutorial is neither a Java tutorial nor a Modding tutorial. If you do not know Java, or you don't know how to Mod with forge, you'd best learn that first. Furthermore, you should at least skim the How it Works page, which gives a quick summary of how Randores functions, before continuing below.
Resources
- Struggling with Java? Check out the official Java tutorials
- Struggling with Forge? Check out the official Forge documentation
- Struggling with Randores? Email me at [email protected], or post a topic on the Minecraft Forge forums and tag me
@Socratic_Phoenix
. You can also check out the example Randores addon
Getting Started
The first step is to setup your development environment for forge modding. For that, check out the Forge getting started guide. After that, you need to include Randores in your project, which can be done through your build.gradle.
Simply include the following in your build.gradle
:
repositories {
maven {
url "http://dl.bintray.com/meguy26/maven"
}
}
dependencies {
//Compile against the deobfuscated version of Randores, but don't use it at runtime
compileOnly "com.gmail.socraticphoenix:Randores:${randoresVersion}:dev"
//Use the full, obfuscated, version of Randores at runtime
runtime "com.gmail.socraticphoenix:Randores:${randoresVersion}:shadow"
}
Note: the default forge build.gradle already includes a
dependencies
block, but you will have to add therepositories
block directly above it.
In the above example, you can either replace ${randoresVersion}
with the version of Randores you want to use, or create a property in your gradle.properties
file, which would look something like this:
randoresVersion=2a1
Note: 2a1 is Randores 2, Alpha 1, and is the very first release
You can browse available versions either on the CurseForge page or in the Maven repository.
Note: Versions 1.x do not support addons and are not available in the Maven repository
Examples
Checkout the the example Randores addon for a working build.gradle
and gradle.properties
example.