Skip to content

Addon Development: Getting Started

Ruben Taelman edited this page Apr 25, 2024 · 7 revisions

This page gives basic instructions for developers on how to get started with writing an addon for Integrated Dynamics.

Using a release from CurseForge

We recommend using Cursemaven when pulling in releases from CurseForge.

1. Add dependencies

As a first step, include Integrated Dynamics, Cyclops Core, and Common Capabilities as dependencies into your build.gradle file:

repositories {
    maven {
        url "https://cursemaven.com"
        content {
            includeGroup "curse.maven"
        }
    }
}

dependencies {
    implementation fg.deobf("curse.maven:integrateddynamics-${integrateddynamics_version}")
    implementation fg.deobf("curse.maven:commoncapabilites-${commoncapabilities_version}")
    implementation fg.deobf("curse.maven:cyclopscore-${cyclopscore_version}")
}

2. Determine versions

The ${integrateddynamics_version}, ${cyclopscore_version}, and ${commoncapabilities_version} are variables that can refer to a gradle.properties file. If this file does not exist yet, create it in the same directory as your build.gradle file, which can look as follows:

integrateddynamics_version=236307:3376007
commoncapabilities_version=247007:3292062
cyclopscore_version=232758:3336467

The format of the version if <project-id>:<file-id>. The project id's will probably never change, but the file id's vary per release. To get the file ID, go to the download page of file you want to use, and the file ID will be in the URL.

In order to select a version to depend on, you can select one of our maven repo:

Learn more on https://www.cursemaven.com/

Using a latest development version

1. Add dependencies

As a first step, include Integrated Dynamics, Cyclops Core, and Common Capabilities as dependencies into your build.gradle file:

repositories {
    maven {
        name "Cyclops Repo"
        url "https://maven.pkg.github.com/CyclopsMC/packages"
        credentials {
            username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
            password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
        }
    }
}

dependencies {
    compile(fg.deobf("org.cyclops.integrateddynamics:IntegratedDynamics:${integrateddynamics_version}")){
        transitive = false
    }
    compile(fg.deobf("org.cyclops.cyclopscore:CyclopsCore:${cyclopscore_version}")){
        transitive = false
    }
    compile(fg.deobf("org.cyclops.commoncapabilities:CommonCapabilities:${commoncapabilities_version}")){
        transitive = false
    }
}

This requires a GitHub personal access token, which must be added to ~/.gradle/gradle.properties:

gpr.user=...
gpr.key=...

2. Determine versions

The ${integrateddynamics_version}, ${cyclopscore_version}, and ${commoncapabilities_version} are variables that can refer to a gradle.properties file. If this file does not exist yet, create it in the same directory as your build.gradle file, which can look as follows:

integrateddynamics_version=1.16.5-1.7.1-61
cyclopscore_version=1.16.5-1.11.5-54
commoncapabilities_version=1.16.5-2.6.0-18

In order to select a version to depend on, you can select one of our maven repo: