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.
- fetch_installer( ) 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:
- Returns:
The installer.
- Raises:
DownloadError – The installer could not be downloaded.
LoaderError – The installer is malformed.
UnsupportedError – The installer is older than Minecraft 1.13.
- Return type:
- version_id( ) str#
Return the id declared by the installer, downloading it if needed.
- Parameters:
- Returns:
The version id.
- Raises:
DownloadError – The installer could not be downloaded.
LoaderError – The installer is malformed.
UnsupportedError – The installer is older than Minecraft 1.13.
- Return type:
- 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,
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-legacyis 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:
LoaderError – The installer is malformed or targets another Minecraft version.
ProcessorError – A processor failed.
JavaError – No usable Java runtime could be found or downloaded.
UnsupportedError – The version is not supported.
NetworkError – Mojang’s version manifest could not be fetched.
DownloadError – A file could not be downloaded.
Cancelled –
cancelwas triggered.
- Return type: