classProcessorLoader#

class ProcessorLoader(
version: str,
minecraft: str,
repository: str = '',
java_index_url: str = 'https://launchermeta.mojang.com/v1/products/java-runtime/2ec0cc96c44e5a76b9c8b7c39df7210883d12871/all.json',
)#

A loader installed by patching Minecraft with processor jars.

repository#

The Maven repository that hosts the installers.

Type:

str

java_index_url#

Where to read Mojang’s runtime index.

Type:

str

abstractmethod installer_url() → str#

Return where this version’s installer jar is published.

fetch_installer(
*,
session: Session | None = None,
cache_dir: Path | None = None,
) → InstallerJar#

Return this version’s installer, downloading it if it is not cached.

The download is checked against the published SHA-1 when there is one.

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

  • cache_dir (Path | None) – The cache directory. Defaults to the per-user cache.

Returns:

The installer.

Raises:
Return type:

InstallerJar

version_id(
*,
session: Session | None = None,
cache_dir: Path | None = None,
) → str#

Return the id declared by the installer, downloading it if needed.

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

  • cache_dir (Path | None) – The cache directory. Defaults to the per-user cache.

Returns:

The version id.

Raises:
Return type:

str

install(
game: GameDir,
*,
java: Path | None = None,
cache_dir: Path | None = None,
session: Session | None = None,
progress: Callable[[Progress], None] | None = None,
cancel: CancelToken | None = None,
) → str#

Install vanilla Minecraft, the libraries and the patched game files.

The version is registered last, so a failed install leaves no broken version behind. This does nothing if the version is already installed.

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

  • java (Path | None) – The Java binary to use. By default, installed runtimes are tried first, then runtimes downloaded from Mojang. jre-legacy is the last choice.

  • cache_dir (Path | None) – The cache directory. Defaults to the per-user cache.

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

  • progress (Callable[[Progress], None] | None) – Receives updates for each stage.

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

Returns:

The installed version id.

Raises:
Return type:

str