MinecraftForge/FML — pull request #474 by Parker8283 (2014-07-13 20:32:29+00:00)
Title: Added FML Mod Update Checker

To along with https://github.com/MinecraftForge/MinecraftForge/issues/1216

This is a FML controlled Mod Update Checker. It puts a use to the updateUrl field in the ModMetadata. If a mod populates the field with the URL to a remote text file, it will be checked for updates. The text file should follow the format `mcversion:modversion`, with a new line for different MC versions. Upon finding updates, a branding is added, letting the user know that there are mods available for updating. It only appears if there are mods available for update. In the Mods menu, if a mod has an update available, its version number will be highlighted in yellow in the sidebar, and in the info screen for it, the text "Update Available!" appears between the last line of info and the description. All mods need to do to opt into the update checking is put their file in the updateUrl field in their mcmod.info files. And the whole thing can be disabled with `-Dfml.disableModUpdateChecker true` for things like modpacks, or just for users who don't like it.

There are things that should be added, like Events to fire at different times for manipulation of this, and support for other formats (like Forge's). But I want to see the feedback on this before I add other things like that.

I did leave some TODOs for things that I had questions on. Also, I know that this isn't perfect, which I guess is the point of PRs; to allow people to tell me what to fix to make it better. One big question I had was when to run this whole operation. I originally thought that it should run on the Client Side only, but then couldn't really find a good place to run it in the code. I settled on the end of the FMLPreInitializationEvent, but that's _***definitely***_ subject to change.

Let me know what you think. Hopefully this can be added at some point, either in its current state, or an extremely modified one.