Package net.minecraft.loot.conditions
Class Alternative
- java.lang.Object
-
- net.minecraft.loot.conditions.Alternative
-
- All Implemented Interfaces:
java.util.function.Predicate<LootContext>
,ILootCondition
,IParameterized
public class Alternative extends java.lang.Object implements ILootCondition
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Alternative.Builder
static class
Alternative.Serializer
-
Nested classes/interfaces inherited from interface net.minecraft.loot.conditions.ILootCondition
ILootCondition.IBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Predicate<LootContext>
composedPredicate
private ILootCondition[]
terms
-
Constructor Summary
Constructors Modifier Constructor Description private
Alternative(ILootCondition[] p_i51209_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Alternative.Builder
alternative(ILootCondition.IBuilder... p_215960_0_)
LootConditionType
getType()
boolean
test(LootContext p_test_1_)
void
validate(ValidationTracker p_225580_1_)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.loot.IParameterized
getReferencedContextParams
-
-
-
-
Field Detail
-
terms
private final ILootCondition[] terms
-
composedPredicate
private final java.util.function.Predicate<LootContext> composedPredicate
-
-
Constructor Detail
-
Alternative
private Alternative(ILootCondition[] p_i51209_1_)
-
-
Method Detail
-
getType
public LootConditionType getType()
- Specified by:
getType
in interfaceILootCondition
-
test
public final boolean test(LootContext p_test_1_)
- Specified by:
test
in interfacejava.util.function.Predicate<LootContext>
-
validate
public void validate(ValidationTracker p_225580_1_)
- Specified by:
validate
in interfaceIParameterized
-
alternative
public static Alternative.Builder alternative(ILootCondition.IBuilder... p_215960_0_)
-
-