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 interface
AdvancementCriterion.BaseBuilder<T extends AdvancementCriterion,B extends AdvancementCriterion.BaseBuilder<T,B>>
A base builder to createAdvancementCriterion
s.static interface
AdvancementCriterion.Builder
A builder to createAdvancementCriterion
s.static interface
AdvancementCriterion.Factory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description AdvancementCriterion
and(Iterable<AdvancementCriterion> criteria)
Combines thisAdvancementCriterion
with the other criteria to create an AND operation.AdvancementCriterion
and(AdvancementCriterion... criteria)
Combines thisAdvancementCriterion
with the other criteria to create an AND operation.static AdvancementCriterion.Builder
builder()
Creates a newAdvancementCriterion.Builder
to createAdvancementCriterion
s.static AdvancementCriterion
dummy()
Gets a dummyAdvancementCriterion
, this criterion will never be triggered by vanilla minecraft.static AdvancementCriterion
empty()
Gets aAdvancementCriterion
which is empty, this means that nothing has to be achieved to unlock aAdvancement
.AdvancementCriterion
or(Iterable<AdvancementCriterion> criteria)
Combines thisAdvancementCriterion
with the other criteria to create an OR operation.AdvancementCriterion
or(AdvancementCriterion... criteria)
Combines thisAdvancementCriterion
with the other criteria to create an OR operation.Optional<FilteredTrigger<?>>
trigger()
Gets theFilteredTrigger
of thisAdvancementCriterion
, if present.
-
-
-
Method Detail
-
empty
static AdvancementCriterion empty()
Gets aAdvancementCriterion
which 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.Builder
to createAdvancementCriterion
s.- Returns:
- The new builder
-
and
AdvancementCriterion and(AdvancementCriterion... criteria)
Combines thisAdvancementCriterion
with 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 thisAdvancementCriterion
with 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 thisAdvancementCriterion
with 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 thisAdvancementCriterion
with 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 theFilteredTrigger
of thisAdvancementCriterion
, if present.- Returns:
- The trigger
-
-