public final class CriterionRegistry extends Object
A registered criterion (trigger) can be retrieved through
Criteria.getById(Identifier)
.
Criteria
Constructor and Description |
---|
CriterionRegistry() |
Modifier and Type | Method and Description |
---|---|
static <T extends net.minecraft.advancement.criterion.Criterion<?>> |
register(T criterion)
Registers a criterion for a trigger for advancements.
|
public static <T extends net.minecraft.advancement.criterion.Criterion<?>> T register(T criterion)
T
- the criterion's typecriterion
- the criterion registeredIllegalArgumentException
- if a criterion with the same id
exists