funcinstall_version#

install_version(
game: GameDir,
version_id: str,
*,
session: Session | None = None,
progress: Callable[[Progress], None] | None = None,
cancel: CancelToken | None = None,
manifest_url: str = 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json',
) → Version#

Download a vanilla version’s JSON and client jar into game.

Files that are already valid are kept.

Parameters:
  • game (GameDir) – The game directory.

  • version_id (str) – The Minecraft version.

  • session (Session | None) – The session to use. A temporary one is created if omitted.

  • progress (Callable[[Progress], None] | None) – Receives updates while the client jar downloads.

  • cancel (CancelToken | None) – Stops the download.

  • manifest_url (str) – Where to read Mojang’s version manifest.

Returns:

The installed version.

Raises:
Return type:

Version