Interface AdvancementCriterion
- All Superinterfaces:
Nameable
- All Known Subinterfaces:
AndCriterion,OperatorCriterion,OrCriterion,ScoreAdvancementCriterion
Represents a criterion that should be acquired
to unlock a
Advancement.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAdvancementCriterion.BaseBuilder<T extends AdvancementCriterion,B extends AdvancementCriterion.BaseBuilder<T, B>> A base builder to createAdvancementCriterions.static interfaceA builder to createAdvancementCriterions.static interface -
Method Summary
Modifier and TypeMethodDescriptionand(Iterable<AdvancementCriterion> criteria) Combines thisAdvancementCriterionwith the other criteria to create an AND operation.and(AdvancementCriterion... criteria) Combines thisAdvancementCriterionwith the other criteria to create an AND operation.static AdvancementCriterion.Builderbuilder()Creates a newAdvancementCriterion.Builderto createAdvancementCriterions.static AdvancementCriteriondummy()Gets a dummyAdvancementCriterion, this criterion will never be triggered by vanilla minecraft.static AdvancementCriterionempty()Gets aAdvancementCriterionwhich is empty, this means that nothing has to be achieved to unlock aAdvancement.or(Iterable<AdvancementCriterion> criteria) Combines thisAdvancementCriterionwith the other criteria to create an OR operation.or(AdvancementCriterion... criteria) Combines thisAdvancementCriterionwith the other criteria to create an OR operation.trigger()Gets theFilteredTriggerof thisAdvancementCriterion, if present.
-
Method Details
-
empty
Gets aAdvancementCriterionwhich is empty, this means that nothing has to be achieved to unlock aAdvancement.- Returns:
- The empty advancement criterion
-
dummy
Gets a dummyAdvancementCriterion, this criterion will never be triggered by vanilla minecraft.- Returns:
- The dummy advancement criterion
-
builder
Creates a newAdvancementCriterion.Builderto createAdvancementCriterions.- Returns:
- The new builder
-
and
Combines thisAdvancementCriterionwith the other criteria to create an AND operation.There is no guarantee that the returned extends
AndCriterion, this depends on if there are duplicate criteria,empty()is present, or when no extra criteria are provided.- Parameters:
criteria- The criteria- Returns:
- The AND operation
-
and
Combines thisAdvancementCriterionwith the other criteria to create an AND operation.There is no guarantee that the returned extends
AndCriterion, this depends on if there are duplicate criteria,empty()is present, or when no extra criteria are provided.- Parameters:
criteria- The criteria- Returns:
- The AND operation
-
or
Combines thisAdvancementCriterionwith the other criteria to create an OR operation.There is no guarantee that the returned extends
OrCriterion, this depends on if there are duplicate criteria,empty()is present, or when no extra criteria are provided.- Parameters:
criteria- The criteria- Returns:
- The OR operation
-
or
Combines thisAdvancementCriterionwith the other criteria to create an OR operation.There is no guarantee that the returned extends
OrCriterion, this depends on if there are duplicate criteria,empty()is present, or when no extra criteria are provided.- Parameters:
criteria- The criteria- Returns:
- The OR operation
-
trigger
Optional<FilteredTrigger<?>> trigger()Gets theFilteredTriggerof thisAdvancementCriterion, if present.- Returns:
- The trigger
-