Interface AdvancementCriterion
-
- All Superinterfaces:
Nameable
- All Known Subinterfaces:
AndCriterion,OperatorCriterion,OrCriterion,ScoreAdvancementCriterion
public interface AdvancementCriterion extends Nameable
Represents a criterion that should be acquired to unlock aAdvancement.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAdvancementCriterion.BaseBuilder<T extends AdvancementCriterion,B extends AdvancementCriterion.BaseBuilder<T,B>>A base builder to createAdvancementCriterions.static interfaceAdvancementCriterion.BuilderA builder to createAdvancementCriterions.static interfaceAdvancementCriterion.Factory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description AdvancementCriterionand(Iterable<AdvancementCriterion> criteria)Combines thisAdvancementCriterionwith the other criteria to create an AND operation.AdvancementCriterionand(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.AdvancementCriterionor(Iterable<AdvancementCriterion> criteria)Combines thisAdvancementCriterionwith the other criteria to create an OR operation.AdvancementCriterionor(AdvancementCriterion... criteria)Combines thisAdvancementCriterionwith the other criteria to create an OR operation.Optional<FilteredTrigger<?>>trigger()Gets theFilteredTriggerof thisAdvancementCriterion, if present.
-
-
-
Method Detail
-
empty
static AdvancementCriterion empty()
Gets aAdvancementCriterionwhich is empty, this means that nothing has to be achieved to unlock aAdvancement.- Returns:
- The empty advancement criterion
-
dummy
static AdvancementCriterion dummy()
Gets a dummyAdvancementCriterion, this criterion will never be triggered by vanilla minecraft.- Returns:
- The dummy advancement criterion
-
builder
static AdvancementCriterion.Builder builder()
Creates a newAdvancementCriterion.Builderto createAdvancementCriterions.- Returns:
- The new builder
-
and
AdvancementCriterion and(AdvancementCriterion... criteria)
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
AdvancementCriterion and(Iterable<AdvancementCriterion> criteria)
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
AdvancementCriterion or(AdvancementCriterion... criteria)
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
AdvancementCriterion or(Iterable<AdvancementCriterion> criteria)
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
-
-