Skip to content

3ri4nG0ld/Minecraft-Mod-Updater

 
 

Repository files navigation

Minecraft Mod Updater

Usage

Clientside

  1. Install the appropriate version of this mod to Minecraft. Currently, only Fabric versions are functional.
  2. The <Minecraft root folder>/mods folder will be cleared on each run. Place additional mod jar files in the <Minecraft root folder>/mods-local folder. Create the folder if it doesn't exist.
  3. Edit <Minecraft root folder>/config/minecraft-mod-updater.json or create it if it doesn't exist. An example is shown below:
    {
    	"synced": [
    		"https://example1.com/url.json",
    		"https://example2.com/url.json"
    	],
    	"local": [
    		{
    			"id": "123456",
    			"source": "curseforge"
    		},
    		{
    			"id": "another-mod-id",
    			"source": "modrinth"
    		},
    		{
    			"id": "My-Mod",
    			"url": "https://example.com/My-Mod.jar",
    			"sha1": "0123456789012345678901234567890123456789"
    		},
    		{
    			"id": "Another-Mod-1.0.0",
    			"url": "https://example.com/Another-Mod-1.0.0.jar",
    			"sha1": "0123456789012345678901234567890123456789",
    			"before": 1615338000000
    		},
    		{
    			"id": "Another-Mod-2.0.0",
    			"url": "https://example.com/Another-Mod-2.0.0.jar",
    			"sha1": "0123456789012345678901234567890123456789",
    			"after": 1615338000000
    		}
    	]
    }
  • synced (Optional): If defined, the Minecraft Mod Updater will pull modpacks from each URL listed. Each URL should be a direct link to a JSON file. See the section below for how this JSON file should be formatted.
  • local (Optional): If defined, the Minecraft Mod Updater will pull mods from each mod listed.
    • id (Required): The mod identifier.
      • If source is also defined this is the mod ID for CurseForge or Modrinth.
      • If url and sha1 are also defined, this can be any recognisable name for the mod.
    • source: (Required if url or sha1 are not defined): The source of the mod, currently only curseforge and modrinth are supported.
    • url (Required if source is not defined): The direct download link to the mod jar file.
    • sha1 (Required if source is not defined): The expected sha1 hash of the mod jar file.
    • before (Optional): If defined, only download the mod if the current time is before this value (in milliseconds since the UNIX epoch).
    • after (Optional): If defined, only download the mod if the current time is on or after this value (in milliseconds since the UNIX epoch).

Distributing a Modpack

  1. Create a JSON file with a publicly available direct download link.
  2. Edit this JSON file. The format is the same as the local section of the client configuration file (without the parent key). An example is shown below:
    [
    	{
    		"id": "123456",
    		"source": "curseforge"
    	},
    	{
    		"id": "another-mod-id",
    		"source": "modrinth"
    	},
    	{
    		"id": "My-Mod",
    		"url": "https://example.com/My-Mod.jar",
    		"sha1": "0123456789012345678901234567890123456789"
    	},
    	{
    		"id": "Another-Mod-1.0.0",
    		"url": "https://example.com/Another-Mod-1.0.0.jar",
    		"sha1": "0123456789012345678901234567890123456789",
    		"before": 1615338000000
    	},
    	{
    		"id": "Another-Mod-2.0.0",
    		"url": "https://example.com/Another-Mod-2.0.0.jar",
    		"sha1": "0123456789012345678901234567890123456789",
    		"after": 1615338000000
    	}
    ]
  3. Add the JSON URL to the synced section of the client configuration file.

License

This project is licensed with the MIT License.

Questions? Comments? Complaints?

Let's connect.

Discord   LinkedIn   Email   Patreon

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%