classInstallerJar#

class InstallerJar(
path: Path,
)#

A downloaded Forge or NeoForge installer, read as an archive.

Parameters:

path (Path) – The installer jar.

path#

The installer jar.

profile#

Its install profile.

version_json#

Its version JSON.

Raises:
property version_id: str#

The id declared by the version JSON.

property version_libraries: list[Library]#

The libraries the version JSON lists for the running game.

extract_bundled_libraries(
libraries_dir: Path,
) → None#

Copy the libraries bundled in the installer into libraries_dir.

Parameters:

libraries_dir (Path) – The game’s libraries directory.

extract_data_file(
name: str,
dest_dir: Path,
) → Path#

Extract a file named by the install profile.

Parameters:
  • name (str) – The file’s path inside the installer.

  • dest_dir (Path) – The directory to extract into.

Returns:

The extracted file.

Raises:

LoaderError – The installer does not contain the file.

Return type:

Path