Jump to content

Recommended Posts

Posted

I am looking for tutorials on making a version checker function for my mod. So that when i do start to distribute my mod, and update it, that the people that have it will be notified. I tried finding how to register with the mod named Version Checker, but could not find information on how to implement it into the mod.

Google searches have proven fruitless, as so many mods have the words version and checker in their name, that it's flooded with them instead of the code i need to see.

Posted

Version Checker is very simple to use if you have an online repository, e.g. Github:

// add this during FMLInitializationEvent:
String link = "https://raw.githubusercontent.com/yourName/YourMod/master/src/main/resources/versionlist.json";
FMLInterModComms.sendRuntimeMessage("your_mod_id", "VersionChecker", "addVersionCheck", link);

Note that it is very important that you use the 'raw' link to your json version file, otherwise it will not work. The format of the file is described in the Version Checker documentation, and it can contain multiple versions' information (e.g. both the latest 1.7.10 and 1.8 versions of your mod).

 

The versionlist.json does not have to be in the resources folder; that just seemed like a semi-logical place to put it, so I stuck it there. You can put it wherever you want.

 

It's really that simple :D Of course, you / any users will need to install Version Checker when playing in order for you to view that information in-game. You do not, however, need to have it installed in your development environment, which is pretty sweet.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.