Moud

Updates#

Moud checks for a new version when the game starts and every half hour after that. When one is out, you can take it without quitting: the new version starts in the background, loads the place you are in, and takes over the window when it is ready. You keep playing or editing the whole time.

Finding out about an update#

A small notice slides in at the bottom right: Moud 1.0.1 is available, with an Update button and a close button. It never takes the keyboard or the mouse and fades after a few seconds. While you play with the mouse captured it is only a notice; open the menu to click it.

Don't show again on the notice turns notices off. The update still shows, quietly, in these places, each with its own Update button:

  • the editor's status bar and its File menu,
  • the pause menu of a place,
  • the Moud section at the bottom of the project hub.

The hub's Moud section also holds the two settings:

Setting
Update notices the notice at the bottom right. On by default
Update automatically start updating as soon as a new version is found, without asking. Off by default

The same two switches are in the editor's File menu. They are kept for this computer in ~/.moud/preferences.json.

What happens when you update#

A small card at the bottom right follows the update. None of it blocks the game.

  1. Downloading. The new jar is downloaded next to your mods, with its progress.
  2. Checking. Moud checks that the jar is the one the Moud team signed, see What Moud refuses.
  3. Starting. The old jar is moved to mods/.moud-old/, the new one takes its place, and the new version starts with the same Java, memory settings and account as the running game. Its window stays hidden while it loads. This takes about as long as starting the game normally.
  4. Handing over. The open scene is saved. The new version opens the same place, or rejoins the same server, puts the window where yours was, and moves the camera where yours was. Then it shows its window and the old game closes.

In a place there is no pause at all: the old game keeps running until the new one is showing. On a server the old game has to leave first, because one account can only be connected once, so you see Updating Moud for the time it takes to rejoin.

The new version writes its startup output to logs/moud-update.log, and its game log to logs/latest.log as usual.

When it restarts instead#

Two games run side by side for a moment, so the update needs about as much free memory as the game already uses. With less than that, the notice says Moud 1.0.1 is ready and offers Restart now. The new jar is already in place, so the next start uses it whether you restart now or later.

When an update fails#

If the new version does not start within two minutes, or stops while starting, the update is undone: the new jar is deleted, the old one goes back into mods/, and your game keeps running as it was. The notice says Update failed, restart later.

What Moud refuses#

Moud only installs a jar it can prove came from the Moud team. Every release is signed with the Moud release key, and the key that checks it is built into the Moud you are running, so a changed download page or a changed download can not replace it. A jar is refused, and your current version keeps running, when:

  • it has no signature, or its signature was not made with the Moud release key,
  • it is not newer than the version you run,
  • it is not Moud, or says it is a different version than the one on offer,
  • it holds libraries or mixins its signature does not list,
  • it does something the running version does not: load code from the internet, start other programs, write into Minecraft's version files, or match known Minecraft malware.

The last check writes what it found to logs/moud-update-report.txt.