Version Checker is a small mod that will show updates for mods in an easy list. Mods currently add version checkers which will spit out a bunch of text to the chatbox at startup of a game, which gets cluttered very quickly. This mod will add a small button at the main menu when it detects an outdated mod. The number represents the number of found outdated mods.
Supported mods I know of:
- Version Checker (duh! )
- A lot, I can't keep track of them all anymore! BC/LP/TT/AE etc. etc.
Bugs and incompatibilities:
How to use:
This mod will add a small button at the main menu when it detects an outdated mod. The number represents the number of found outdated mods.
When you click the button an interface will come up, showing you all outdated mods, their version number and the update available. Mod can register updates in multiple way, making it easy to implement.
When you double-click on a mod it will open a window with the change log (if available). If a mod has given Version Checker a direct link it will auto-download the mod for you and place it in the correct folder automagically! If a non direct link is given you'll be able to open the page where you can find the update, easy!
When you've updated all your mods, a quick restart is needed to remove all old mods (it does that automatically too!). And you're done!
Information for modders:
So, you want to include your mod in the Version Checker list? It's really easy and takes just a few lines of code!
Currently there are multiple ways of adding your mod to the list.
Option 1. (super easy)
If you do not have a version checker yourself and your project is uploaded to CurseForge you can make Version Checker check the latest version there. This is the most error-prone way to check for the latest version, but requires little work and doesn't need a special action every update. NOTE: always checks the latest uploaded file and can't check if the file is compatible with the current Minecraft version, mod version must be in file name, no changelog support
- Get the project name and id of your CurseForge project. To find it go to the CurseForge page of your project and copy the text after '/mc-mods/'. For Version Checker this is: '221140-version-checker' this should be very similar for your project (a number with your project name).
- In your mod make a new NBTTagCompound.
- Add a new String to the NBTTagCompound with the text you found above, the tag should be 'curseProjectName'.
- Add another String to the NBTTagCompound with info about your file name. Version Checker needs to find the version of your mod with your file name. Version Checker can find out what is the version in the file name, with a String. This String will contain the file name of your files, but on the place the mod version would normally go this ''. Your file name cannot contain these characters on other places. For Version Checker the filename is for example 'VersionChecker-1.1.4.jar'. The sent String will be 'VersionChecker-.jar'. The tag should be 'curseFilenameParser'.
- You can add a modDisplayName and oldVersion tag (see Option 3)
- Now send it using: FMLInterModComms.sendRuntimeMessage(YOUR_MOD_ID, "VersionChecker", "addCurseCheck", compound)
compound is the newly create NBTTagCompound (see above).
Option 2. (easy)
If you do not have a version checker yourself you can use the Version Checker one. The only thing you then need to do is host a file somewhere and update it when your mod updates!
- Host a file like this somewhere and make sure it's accessible via a direct link and make sure this link doesn't change
- Change the values to fit your mod (don't forget to set isDirectLink correctly!)
- Get the direct link to this file and send it to Version Checker like this:
FMLInterModComms.sendRuntimeMessage(YOUR_MOD_ID, "VersionChecker", "addVersionCheck", link)
Option 3. (moderate)
- Make a new NBTTagCompound.
- Add as much information from this list as you can:
String; Tag: "modDisplayName"; Info: the name you want your mod to show up (optional, Version Checker can figure this out on it self)
String; Tag: "oldVersion" Info: the current, outdated version of your mod (optional, Version Checker can figure this out on it self)
String; Tag "newVersion" Info: the new version available for the user
String; Tag "updateUrl" Info: The link to the download of the mod, preferably a direct link (that will allow Version Checker to download and install the mod automatically)
Boolean; Tag "isDirectLink" Info: boolean if the sent link is direct (see above)
String; Tag "changeLog" Info: the change log of the new version (optional)
String; Tag "newFileName" Info: the name of the new file that will be downloaded (optional, Version Checker will use the name of the old version, but replace the version number when not sent)
- Now send it using: FMLInterModComms.sendRuntimeMessage(YOUR_MOD_ID, "VersionChecker", "addUpdate", compound)
compound is the newly create NBTTagCompound (see above).
Option 4. (hard)
- Create a new instance of "com.dynious.versionchecker.api.Update" using Reflection (constructor takes one String (the mod id) as parameter) or by depending on it.
- Set as much values as you can.
- Use the "toJson()" method to get a String of the class
- FMLInterModComms.sendRuntimeMessage(YOUR_MOD_ID, "VersionChecker", "addUpdate", string)
string is the string returned by toJson()
This mod is licensed under the LGPL. This means it's completely open for (almost) any use. You can add it to any modpack you like and I'l try not to create drama, so it stays this way .
Version Checker is open source. This means you can see how I did things, copy them or even make them make them better by Pull Requesting! You can find the source here.
Crash? Balancing Issue? Other problems? Post them on the Version Checkers GitHub. You can find it here. Unable to make a GitHub account? Then post them here in the thread.
Think you know how to optimize my mod and you know a little Java? Please submit a Pull Request. Any help would be appreciated. You can Pull Request here.
I have a Patreon page where you can support me with a monthly donation. This is very much appreciated!
There are two preferred ways to contact me: Twitter and Minecraft Forums PMs. You can also follow me (@Dynious) on Twitter to hear all the latest news/ramblings from me
I'll be removing my version detector and moving to yours ASAP.
Right after I'm done with today's summer homework, of course.
Woohoo! Please take a look at the 'information for modders' tab. The actual version detecting is still done by the mods themselves, but informing the user, downloading and installation is handled by Version Checker. In this way I still allow mods to use their own preferred type of version detection, but I allow for easy integration!
This is THE MOST USEFUL AND COOLEST MOD EVER =D
But one question, Does it only work with forge mods? Cause i use liteloader mods more than anything....
It uses an FML feature called "InterModCommunications", all mods integrating with Version Checker currently have to use that (although I will allow other ways in the future)! I also build this in a Forge environment, so you will at least need FML, but probably also Forge to run this mod.
I'll give it a quick try Edit: Also, if a mod doesn't use a direct link, and you're using steam to play minecraft, could you open the link on Steam's web browser? Might be a little/lot tricky. Hey, it's just a suggestion!
A quick Google search wasn't very helpful, for now it will just pick your standard browser, but later on I might be able to figure something out
I was planning on making a mod which would be a combination of this and OpenEye, but since both already exist, there is no reason for me to make that anymore
Looking forward to a possible OpenEye integration with this.