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
Modifier and TypeInterfaceDescriptionstatic interface
AdvancementCriterion.BaseBuilder<T extends AdvancementCriterion,
B extends AdvancementCriterion.BaseBuilder<T, B>> A base builder to createAdvancementCriterion
s.static interface
A builder to createAdvancementCriterion
s.static interface
-
Method Summary
Modifier and TypeMethodDescriptionand
(Iterable<AdvancementCriterion> criteria) Combines thisAdvancementCriterion
with the other criteria to create an AND operation.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
.or
(Iterable<AdvancementCriterion> criteria) Combines thisAdvancementCriterion
with the other criteria to create an OR operation.or
(AdvancementCriterion... criteria) Combines thisAdvancementCriterion
with the other criteria to create an OR operation.trigger()
Gets theFilteredTrigger
of thisAdvancementCriterion
, if present.type()
Gets theTrigger
of thisAdvancementCriterion
, if present.
-
Method Details
-
empty
Gets aAdvancementCriterion
which 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.Builder
to createAdvancementCriterion
s.- Returns:
- The new builder
-
and
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
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
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
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
-
type
Gets theTrigger
of thisAdvancementCriterion
, if present.- Returns:
- The trigger
-