Advancement
AdvancementsData
¶
AdvancementsData(
reset_clear: bool,
advancements: Dict[str, Advancement],
removed_advancements: List[str],
progress: Dict[str, AdvancementProgress],
)
Represents the full advancement data for a player/session.
| ATTRIBUTE | DESCRIPTION |
|---|---|
reset_clear |
Indicates whether all advancement data should be reset.
TYPE:
|
advancements |
All defined advancements.
TYPE:
|
removed_advancements |
Advancement IDs that have been removed. |
progress |
The player's progress on each advancement.
TYPE:
|
get_advancement
¶
get_advancement(
advancement_id: str,
) -> Optional[Advancement]
Retrieve an advancement definition.
| PARAMETER | DESCRIPTION |
|---|---|
advancement_id
|
The ID of the advancement.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Optional[Advancement]
|
The advancement, or None if not found. |
get_progress
¶
get_progress(
advancement_id: str,
) -> Optional[AdvancementProgress]
Retrieve the progress for a specific advancement.
| PARAMETER | DESCRIPTION |
|---|---|
advancement_id
|
The ID of the advancement.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Optional[AdvancementProgress]
|
The progress data, or None if not found. |
get_completed_advancements
¶
Advancement
¶
Advancement(
parent_id: Optional[str],
display_data: Optional[AdvancementDisplay],
criteria: Dict[str, None],
requirements: List[List[str]],
)
Represents a single advancement definition.
| ATTRIBUTE | DESCRIPTION |
|---|---|
parent_id |
The identifier of the parent advancement. |
display_data |
Display information for the advancement.
TYPE:
|
criteria |
The criteria required for this advancement. |
requirements |
Requirement groups, where each sublist is an OR-group. |
has_parent
¶
has_parent() -> bool
Check if the advancement has a parent.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if a parent exists, False otherwise. |
has_display
¶
has_display() -> bool
Check if the advancement has display data.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if display data is present, False otherwise. |
get_criteria_ids
¶
AdvancementDisplay
¶
AdvancementDisplay(
title: Any,
description: Any,
icon: Any,
frame_type: int,
flags: int,
background_texture: Optional[str],
position: Vector2D[int],
)
Holds display-related data for an advancement.
| ATTRIBUTE | DESCRIPTION |
|---|---|
title |
The title of the advancement.
TYPE:
|
description |
The description text.
TYPE:
|
icon |
The icon representation.
TYPE:
|
frame_type |
Type of the frame (e.g., task, challenge).
TYPE:
|
flags |
Flags controlling display features.
TYPE:
|
background_texture |
Optional background texture resource. |
position |
position in the advancement tree.
TYPE:
|
AdvancementProgress
¶
AdvancementProgress(criteria: Dict[str, CriterionProgress])
Represents the progress across multiple advancement criteria.
| ATTRIBUTE | DESCRIPTION |
|---|---|
criteria |
Mapping of criterion IDs to their progress state.
TYPE:
|
get_criterion
¶
get_criterion(
criterion_id: str,
) -> Optional[CriterionProgress]
Retrieve progress for a specific criterion.
| PARAMETER | DESCRIPTION |
|---|---|
criterion_id
|
The identifier of the criterion.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Optional[CriterionProgress]
|
The progress state for the criterion, or None if not found. |
CriterionProgress
¶
Represents the progress of a single advancement criterion.
| ATTRIBUTE | DESCRIPTION |
|---|---|
achieved |
Whether the criterion has been achieved.
TYPE:
|
date_of_achieving |
The timestamp of when the criterion was achieved. |