Posted May 15, 201510 yr 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.
May 15, 201510 yr 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 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. http://i.imgur.com/NdrFdld.png[/img]
May 16, 201510 yr Hi. coolAlias Can I using file .txt instead of .json? You should ask the author of Version Checker, but I presume NO. All the documentation I saw specified .json format, which basically IS a text file with a special format. Just don't save it as .txt. http://i.imgur.com/NdrFdld.png[/img]
May 16, 201510 yr I also have a tutorial on doing version checking, using txt or whatever file. It checks against a string on a web page (could be github, that's the way I do it) and can display a message to the player if the mod is out of date. http://jabelarminecraft.blogspot.com/p/minecraft-forge-1721710-making-mod.html Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.