Integrating the Forge Update Checker

Introduction

Forge provides a very lightweight, opt-in, update-checking framework for your mods, which MCreator supports.

 

Integration

How-To

1. Create a JSON file containing update information in the below format

{
  "homepage": "<homepage/download page for your mod>",
  "<mcversion>": {
    "<modversion>": "<changelog for this version>", 
    // List all versions of your mod for the given Minecraft version, along with their changelogs
    ...
  },
  "promos": {
    "<mcversion>-latest": "<modversion>",
    // Declare the latest "bleeding-edge" version of your mod for the given Minecraft version
    "<mcversion>-recommended": "<modversion>",
    // Declare the latest "stable" version of your mod for the given Minecraft version
    ...
  }
}

Example Valid File

{
  "homepage": "https://mcreator.net/examplemod",
  "promos": {
    "1.14.4-latest": "1.1.1",
    "1.14.4-recommended": "1.1.0"
  }
}

2. Upload this file to a remote hosting site of your choice. (Github, PasteBin, etc.) and copy the raw document link

3. Go to MCreator menu > Workspace Settings > Advanced > Mod Update JSON URL and paste the link in the input box

4. Updates are checked automatically every time you start Minecraft Client, and return the corresponding result in the console

Results Table

FAILED The version checker could not connect to the URL provided.
UP_TO_DATE The current version is equal to or newer than the latest stable version.
OUTDATED There is a new stable version.
BETA_OUTDATED There is a new unstable version.
BETA The current version is equal to or newer than the latest unstable version.
PENDING The result requested has not finished yet, so you should try again in a little bit.
 

Notes and Common Pitfalls

1. Separate Changelog into lines using \n

2. If you are using GitHub, BitBucket, etc. the repository must be public and accessible to everyone

3. The following section is entirely optional

"<mcversion>": {
    "<modversion>": "<changelog for this version>", 
    // List all versions of your mod for the given Minecraft version, along with their changelogs
    ...
  },

4. In JSON, do not include a comma in the last member in an object. If you are unsure, use JSONLINT to validate the file

5. If you are using GitHub or services like that, use the raw link, do not use the page link

6. Changes to the file may take a few minutes to reflect on the Update Checker, be patient

 

Results

If any mods have an available update (JSON File is changed), it will show a flashing icon (shown below)

IconEmerald2

 

on the ‘Mods’ button of the main menu and mod list along with the respective changelogs. It does not download updates automatically.

 

Contains information found on the Forge Documentation Site.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.