classAddition#

class Addition(
entry: PackEntry,
name: str,
slug: str = '',
project_type: Literal['mod', 'modpack', 'resourcepack', 'shader'] = 'mod',
sha1: str = '',
requested: bool = True,
requires: tuple[str, ...] = (),
pinned: bool = False,
)#

A project installed on its own, rather than by the instance’s pack.

entry#

The file: its path in the instance, its download and its hashes. Its ref names the platform, project and release.

Type:

PackEntry

name#

The project’s display name.

Type:

str

slug#

The project’s short name.

Type:

str

project_type#

The kind of project, such as mod or shader.

Type:

Literal[‘mod’, ‘modpack’, ‘resourcepack’, ‘shader’]

sha1#

The file’s hash when it was installed. A different hash means the player changed it.

Type:

str

requested#

Whether it was asked for, rather than installed because another addition needs it.

Type:

bool

requires#

The ids of the projects it needs.

Type:

tuple[str, …]

pinned#

Whether Instance.plan_updates leaves it at this release.

Type:

bool

property path: str#

Where the file goes, relative to the instance.

property platform: str#

The name of the platform it came from.

property project_id: str#

The project’s id on its platform.

property release_id: str#

The installed release’s id on its platform.

matches(
name: str,
) → bool#

Return whether name is this addition’s project id, slug or path.