classModpack#
- class Modpack(
- format: str,
- name: str,
- version: str,
- minecraft: str,
- loader_kind: str,
- loader_version: str,
- entries: tuple[PackEntry, ...],
- archive: Path,
- override_roots: Mapping[str, str] = {},
- memory_mb: int | None = None,
A parsed modpack archive, independent of its format and platform.
- override_roots#
Archive folders with extra files, keyed by
common,clientorserver.
- property loader: Loader#
The pack’s mod loader.
- Raises:
UnsupportedError – The loader is not supported.
- override_members(
- side: Literal['client', 'server'] = 'client',
Return the pack’s override files without reading their contents.
- iter_override_files(
- side: Literal['client', 'server'] = 'client',
- only: Collection[str] | None = None,
Yield override files as open streams, so large files stay out of memory.
- Parameters:
side (Literal['client', 'server']) – The side to read.
only (Collection[str] | None) – The relative paths to read. Defaults to every file.
- Yields:
Each file’s path relative to the instance, and a stream of its contents. The stream closes when the iteration moves on.
- Raises:
PackError – A file’s path is unsafe.
- iter_overrides(
- side: Literal['client', 'server'] = 'client',
Yield the pack’s override files with their contents.