Skip to content
Pokechu22 edited this page Dec 27, 2015 · 1 revision

As of 1.8.8a / 1.8d / 1.7.10whatever, WorldDownloader has a system for checking for new releases! This page documents how it works and how to use it (including in forks of the mod).

Use as a player

When playing the game, the update system should be relatively easy to use. In chat, you will receive a notification if a new version is available. There's also a couple of GUIs that mirrors the release list:

Update list GUI

Update list

In the update list GUI, you can see a list of updates. The current version will be outlined, and the version your mouse is over will be highlighted. (No version is outlined in this picture). Clicking on a version takes you to its information page.

The upper buttons control what types of updates are used to determine if there is a new version for you to install. The left button cycles between "Any Minecraft Version", "Installed on <>", and "Connects to <> servers", which are mostly self-explanatory. (The difference between installed on and connects to is that you might have a 1.8.8 version and a 1.8 version; if you are using mods the specific version matters but otherwise it does not). On the right, you can control whether beta versions are to be included.

Single update

Clicking an update shows more information about it, most notably the changelog, but also some version information. There also is a link to view the release online (and download it), and view the forum post coinciding with that release.

Technical information

The entire update checking system works via GitHub releases - you can see the release list here. It also uses GitHub's releases API to fetch the needed information.

See https://api.github.com/repos/Pokechu22/WorldDownloader/releases?per_page=100 for an example result.

Further information, such as the expected Minecraft version and file hashes, is embedded in the post description. What's that? You can't see the info? That's because it uses a trick with Markdown.

In markdown, [Link text](http://example.com 'Tooltip') creates a link with a tooltip: Link text. However, if you link to just #, it's an anchor on the same page and essentially serves as a non-linking link: [Link text](# 'Tooltip') = Link text. You can then remove the "Link text" portion, resulting in [](# 'Tooltip') - text that doesn't render, but still is there, and contains meaningful information.

What is done here is that some JSON embedded in that tooltip. Quite a lot, actually - the version, supported versions, mod type, post URL, and hashes of every file in the mod. This data is generated using this tool. The information hidden there and the information on the release itself are enough to create the version list.

I opted to use data embedded in the version list rather than as an attached file because that way I can load all of the needed data in one go, rather than downloading several files. Plus, it keeps people from seeing a file that they don't need to download.

You can see how this data is parsed in wdl.update.GithubInfoGrabber.

If you're creating a custom version of the mod, edit WDL#GITHUB_REPO to point to your repository, and then create a release with all of the needed info. That's all you'll need to do!

GUIs

Various screens that are used in the mod

Mechanisms

Information on how World Downloader achieves various things, both technically and practically

Clone this wiki locally