Changes

8 bytes added ,  12:20, 7 January 2021
replace 'update checker' to 'version checker'
Line 1: Line 1: −
The '''Update Checker''' is a Forge-provided utility for mods to check for new versions based on an online update JSON file. It is lightweight, toggleable, asynchoronous to the main mod loading, and integrates cleanly with the mods list menu.
+
The '''Version Checker''' is a Forge-provided utility for mods to check for new versions based on an online update JSON file. It is lightweight, toggleable, asynchoronous to the main mod loading, and integrates cleanly with the mods list menu.
   −
If there are outdated mods according to the update checker, a flashing emerald indicator will be shown on the Mods button on the main menu. The entries for the outdated mods in the mods list screen have the flashing emerald indicator. The information screen for outdated mods will have an <code>Update available:</code> line with the <code>homepage</code> URL from the update JSON file, and a list of mod versions and corresponding text after the mod description, for the mod versions between the most up-to-date and the currently installed version.
+
If there are outdated mods according to the version checker, a flashing emerald indicator will be shown on the Mods button on the main menu. The entries for the outdated mods in the mods list screen have the flashing emerald indicator. The information screen for outdated mods will have an <code>Update available:</code> line with the <code>homepage</code> URL from the update JSON file, and a list of mod versions and corresponding text after the mod description, for the mod versions between the most up-to-date and the currently installed version.
 
<!-- TODO: add images of these -->
 
<!-- TODO: add images of these -->
   −
The update checker can be configured through the <code>versionCheck</code> option in the FML config (<tt>config/fml.toml</tt>). This option controls the version checking for all mods, including Forge.
+
The version checker can be configured through the <code>versionCheck</code> option in the FML config (<tt>config/fml.toml</tt>). This option controls the version checking for all mods, including Forge.
    
== Update JSON format ==
 
== Update JSON format ==
The update checker checks the update JSON, specified by the <code>updateJSONURL</code> for the [[Proper Mod Structuring#Mod Properties|mod in the <tt>mods.toml</tt>]]. An example of a JSON file is the [https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json update JSON for Minecraft Forge]. The JSON file must be in the following format:
+
The version checker checks the update JSON, specified by the <code>updateJSONURL</code> for the [[Proper Mod Structuring#Mod Properties|mod in the <tt>mods.toml</tt>]]. An example of a JSON file is the [https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json update JSON for Minecraft Forge]. The JSON file must be in the following format:
 
{{Tree list}}
 
{{Tree list}}
 
* '''Root object'''
 
* '''Root object'''
Line 21: Line 21:     
== Update status ==
 
== Update status ==
There are 7 possible update checker statuses, according to the <code>VersionChecker.Status</code> enum:
+
There are 7 possible version checker statuses, according to the <code>VersionChecker.Status</code> enum:
* <code>PENDING</code> - The update checker has not or is currently retrieving the version from the update JSON. This is temporary, and will change into one of the other statuses.
+
* <code>PENDING</code> - The version checker has not or is currently retrieving the version from the update JSON. This is temporary, and will change into one of the other statuses.
* <code>FAILED</code> - The update checker failed, either to retrieve the update JSON or some other error (such as failure to parse broken JSON).
+
* <code>FAILED</code> - The version checker failed, either to retrieve the update JSON or some other error (such as failure to parse broken JSON).
 
* <code>UP_TO_CODE</code> - The currently installed version is the same as the recommended version for the current Minecraft version.
 
* <code>UP_TO_CODE</code> - The currently installed version is the same as the recommended version for the current Minecraft version.
 
* <code>OUTDATED</code> - The currently installed version is either behind the recommended version for the MC version, or ahead of the recommended version, but behind the latest version for the MC version.
 
* <code>OUTDATED</code> - The currently installed version is either behind the recommended version for the MC version, or ahead of the recommended version, but behind the latest version for the MC version.
Line 31: Line 31:     
== <tt>CheckResult</tt> ==
 
== <tt>CheckResult</tt> ==
The update checker result for a mod can be retrieving using the <code>VersionChecker.getResult(IModInfo)</code> static method which returns a <code>CheckResult</code>. (<code>IModInfo</code> is the information for a specific mod; see <code>ModList#getModContainerById(String)</code> and <code>ModContainer#getModInfo()</code>).
+
The version checker result for a mod can be retrieving using the <code>VersionChecker.getResult(IModInfo)</code> static method which returns a <code>CheckResult</code>. (<code>IModInfo</code> is the information for a specific mod; see <code>ModList#getModContainerById(String)</code> and <code>ModContainer#getModInfo()</code>).
    
The <code>CheckResult</code> contains four unmodifiable fields:
 
The <code>CheckResult</code> contains four unmodifiable fields:
297

edits