GalacticraftAPI icon indicating copy to clipboard operation
GalacticraftAPI copied to clipboard

Addon API for modern versions of Galacticraft.

Maven metadata URL Team Galacticraft Discord Issues GalacticraftDev Twitch

Galacticraft API

The Galacticraft addon API.

Features

Here are a list of features, both planned and implemented.

  • [x] Celestial bodies.
  • [x] Celestial body registry.
  • [x] Celestial body display info.
  • [x] Atmospheric Info.
  • [x] Atmospheric Gases.
  • [ ] Rockets/Rocket parts.

Installing

In your mod's build.gradle (Groovy) or build.gradle.kts (Kotlin):

Important Note

Replace {VERSION} with the version of Galacticraft you want to use.
Versions use the format MAJOR.MINOR.PATCH[-TYPE]+MC_VERSION, e.g. 0.1.0-alpha+1.14.4 & 1.0.0+1.15.1.
For more versioning information visit the semver website.

  1. Add the Team Galacticraft maven repository

    • Groovy
       repositories {
           maven { url "https://maven.galacticraft.dev/repository/maven-releases/" }
       }
      
    • Kotlin
       repositories {
           maven("https://maven.galacticraft.dev/repository/maven-releases/")
       }
      
  2. Add Galacticraft API as a dependency

    Mostly the same for both Groovy and Kotlin, adjust as needed

    dependencies {
        // add both the addon api and mod but only include the addon api 
        modImplementation("dev.galacticraft:GalacticraftAPI:{VERSION}")
        //modRuntimeOnly("dev.galacticraft:Galacticraft:{VERSION}") // not up yet
    }
    
  3. Add the Addon API to your fabric.mod.json in the depends section.

    {
        "depends": {
            "galacticraft-api": ">={VERSION}"
        },
        "suggests": {
            "galacticraft": ">={VERSION}"
        }
    }