AdvancementProgress

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.advancement.AdvancementProgress;

Implements

Undocumented Interfaces

Comparable<AdvancementProgress>

Members

Getter
Gets the completed criteria for the advancement
script.zs
// AdvancementProgress.completedCriteria as List<string>
myAdvancementProgress.completedCriteria

Return Type: List<string>

Getter
Checks if the advancement is done
script.zs
// AdvancementProgress.done as bool
myAdvancementProgress.done

Return Type: bool

getCriterion(criterionName as string) as CriterionProgress
Gets the criterion progress for the advancement

Returns: The criterion progress, or null if it doesn't exist

script.zs
// AdvancementProgress.getCriterion(criterionName as string) as CriterionProgress;
myAdvancementProgress.getCriterion(myString);

Parameters:

criterionName Type: string - The name of the criterion to get progress for

Return Type: CriterionProgress

grantProgress(criterionName as string) as bool
Grants progress to the advancement

Returns: true if the progress was granted, false otherwise

script.zs
// AdvancementProgress.grantProgress(criterionName as string) as bool;
myAdvancementProgress.grantProgress(myString);

Parameters:

criterionName Type: string - The name of the criterion to grant progress to

Return Type: bool

Getter
Checks if the advancement has progress
script.zs
// AdvancementProgress.hasProgress as bool
myAdvancementProgress.hasProgress

Return Type: bool

Getter
Gets the percentage of the advancement that is complete
script.zs
// AdvancementProgress.percent as float
myAdvancementProgress.percent

Return Type: float

Getter
Gets the progress text for the advancement
script.zs
// AdvancementProgress.progressText as Component
myAdvancementProgress.progressText

Return Type: Component

Getter
Gets the remaining criteria for the advancement
script.zs
// AdvancementProgress.remainingCriteria as List<string>
myAdvancementProgress.remainingCriteria

Return Type: List<string>

revokeProgress(criterionName as string) as bool
Revokes progress from the advancement

Returns: true if the progress was revoked, false otherwise

script.zs
// AdvancementProgress.revokeProgress(criterionName as string) as bool;
myAdvancementProgress.revokeProgress(myString);

Parameters:

criterionName Type: string - The name of the criterion to revoke progress from

Return Type: bool