classMetaLoader#
- class MetaLoader( )#
A loader described by a version JSON from a metadata service.
- profile( ) dict[str, Any]#
Fetch this loader’s version JSON.
- Parameters:
session (Session | None) – The session to use. A temporary one is created if omitted.
- Returns:
The decoded JSON.
- Raises:
NetworkError – The service failed or does not know this version.
- Return type:
- version_id( ) str#
Return the id from the metadata service.
- Parameters:
- Returns:
The version id.
- Raises:
NetworkError – The service failed or does not know this version.
- 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 version JSON.
This does nothing if the version is already installed.
- Parameters:
game (GameDir) – The game directory.
java (Path | None) – The Java binary to use. Not used by this loader.
cache_dir (Path | None) – The cache directory. Not used by this loader.
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:
NetworkError – The metadata service could not be reached.
UnsupportedError – Mojang does not publish this Minecraft version.
DownloadError – A file could not be downloaded.
Cancelled –
cancelwas triggered.
- Return type: