This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
ModUpdater/MOD_DEVELOPERS.md
TheBrokenRail 7b43cf36bb
All checks were successful
ModUpdater/pipeline/head This commit looks good
Fix Documentation Jump Links
2020-06-29 10:26:25 -04:00

2.5 KiB

Mod Developers

To opt-in a mod for ModUpdater, you must select an update strategy in fabric.mod.json.

CurseForge

This update strategy uses the CurseForge API to check for updates.

fabric.mod.json

{
    "custom": {
        "modupdater": {
            "strategy": "curseforge",
            "projectID": 306612
        }
    }
}

GitHub Releases

This update strategy uses the GitHub Releases API to check for updates.

fabric.mod.json

{
    "custom": {
        "modupdater": {
            "strategy": "github",
            "owner": "Repository Owner",
            "repository": "Repository Name"
        }
    }
}

Maven

This update strategy uses the specified Maven repository to check for updates.

fabric.mod.json

{
    "custom": {
        "modupdater": {
            "strategy": "maven",
            "repository": "https://maven.fabricmc.net",
            "group": "net.fabricmc.fabric-api",
            "artifact": "fabric-api"
        }
    }
}

JSON

This update strategy uses the specified JSON file to check for updates.

fabric.mod.json

{
    "custom": {
        "modupdater": {
            "strategy": "json",
            "url": "https://example.com/thing.json"
        }
    }
}

JSON Format

{
    "1.16.1": {
        "version": "1.0.1",
        "downloadUrl": "https://example.com/thing2.jar"
    },
    "20w20a": {
        "version": "1.0.0",
        "downloadUrl": "https://example.com/thing.jar"
    }
}
  • Does Not Require Semantic Versioning
  • build.gradle Modification Is Not Required

build.gradle Modification

Multiple update strategies require the Minecraft version to be appended to the end of the JAR version to detect what Minecraft version a JAR supports.

Replace:

version = project.mod_version

with:

version = "${project.mod_version}+${project.minecraft_version}"

If you prefer hyphens you can also use:

version = "${project.mod_version}-${project.minecraft_version}"

You can also just use the major version of Minecraft instead of the full version (like 1.16 instead of 1.16.1 or 20w20a).