Class CompositeLootItemCondition
java.lang.Object
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition
- All Implemented Interfaces:
Predicate<LootContext>, LootContextUser, LootItemCondition, Validatable
- Direct Known Subclasses:
AllOfCondition, AnyOfCondition
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Predicate<LootContext> protected final List<LootItemCondition> Fields inherited from interface LootItemCondition
CODEC, DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompositeLootItemCondition(List<LootItemCondition> terms, Predicate<LootContext> composedPredicate) -
Method Summary
Modifier and TypeMethodDescriptionabstract MapCodec<? extends CompositeLootItemCondition> codec()protected static <T extends CompositeLootItemCondition>
MapCodec<T> createCodec(Function<List<LootItemCondition>, T> factory) protected static <T extends CompositeLootItemCondition>
Codec<T> createInlineCodec(Function<List<LootItemCondition>, T> factory) final booleantest(LootContext context) voidvalidate(ValidationContext output) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LootContextUser
getReferencedContextParams
-
Field Details
-
terms
-
composedPredicate
-
-
Constructor Details
-
CompositeLootItemCondition
protected CompositeLootItemCondition(List<LootItemCondition> terms, Predicate<LootContext> composedPredicate)
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLootItemCondition
-
createCodec
protected static <T extends CompositeLootItemCondition> MapCodec<T> createCodec(Function<List<LootItemCondition>, T> factory) -
createInlineCodec
protected static <T extends CompositeLootItemCondition> Codec<T> createInlineCodec(Function<List<LootItemCondition>, T> factory) -
test
- Specified by:
testin interfacePredicate<LootContext>
-
validate
- Specified by:
validatein interfaceLootContextUser- Specified by:
validatein interfaceValidatable
-