AdvancementRequirements

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.AdvancementRequirements;

Members

count(test as function(t as string) as bool) as int
Counts the advancement requirements

Returns: The count of the advancement requirements

script.zs
// AdvancementRequirements.count(test as function(t as string) as bool) as int;
myAdvancementRequirements.count(myPredicate);

Parameters:

test Type: function(t as string) as bool - The predicate to count the advancement requirements with

Return Type: int

Getter
Checks if the advancement requirements is empty
script.zs
// AdvancementRequirements.isEmpty as bool
myAdvancementRequirements.isEmpty

Return Type: bool

Getter
Gets the names of the advancement requirements
script.zs
// AdvancementRequirements.names as Set<string>
myAdvancementRequirements.names

Return Type: Set<string>

Getter
Gets the requirements of the advancement
script.zs
// AdvancementRequirements.requirements as List<List<string>>
myAdvancementRequirements.requirements

Return Type: List<List<string>>

Getter
Gets the size of the advancement requirements
script.zs
// AdvancementRequirements.size as int
myAdvancementRequirements.size

Return Type: int

test(test as function(t as string) as bool) as bool
Tests the advancement requirements

Returns: true if the advancement requirements test passes, false otherwise

script.zs
// AdvancementRequirements.test(test as function(t as string) as bool) as bool;
myAdvancementRequirements.test(myPredicate);

Parameters:

test Type: function(t as string) as bool - The predicate to test the advancement requirements with

Return Type: bool