v0.13:API

From Mystcraft
Revision as of 21:44, 16 August 2018 by Veovis Muad'dib (talk | contribs) (Show how to include the Mystcraft API via build.gradle)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Mystcraft provides an API to allow other mods to add interactions with Mystcraft mechanics to their own mods. Using the API directly requires some basic knowledge of Java-based mod development, search for Forge modding tutorials for more information.

Setup

Getting the API

The Mystcraft API file is available in a Maven repository, which makes it very convenient to manage in your Gradle build script.

NOTE: Only edit your build.gradle file below the following line:

//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

The following snippet will allow you to compile against the Mystcraft API, and will automatically include the full Mystcraft mod when debugging.

def mystcraft_version = "0.13.6.00"

repositories {
    maven {
        name "xcompwiz"
        url "http://maven.xcompwiz.com"
    }
}

dependencies {
    compileOnly "com.xcompwiz.mystcraft:mystcraft-api:${mystcraft_version}"
    runtime "com.xcompwiz.mystcraft:mystcraft:${mystcraft_version}"
}

If you would prefer to manage the .jar yourself, the API is available for download on Curseforge under the "Additional Files" section for a given Mystcraft release.