Class CompositeLootItemCondition
java.lang.Object
net.minecraft.world.level.storage.loot.predicates.CompositeLootItemCondition
- All Implemented Interfaces:
Predicate<LootContext>,LootContextUser,LootItemCondition
- 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 net.minecraft.world.level.storage.loot.predicates.LootItemCondition
CODEC, DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompositeLootItemCondition(List<LootItemCondition> pTerms, Predicate<LootContext> pComposedPredicate) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T extends CompositeLootItemCondition>
com.mojang.serialization.MapCodec<T> createCodec(Function<List<LootItemCondition>, T> pFactory) protected static <T extends CompositeLootItemCondition>
com.mojang.serialization.Codec<T> createInlineCodec(Function<List<LootItemCondition>, T> pFactory) final booleantest(LootContext pContext) voidvalidate(ValidationContext pContext) Validate that this object is used correctly according to the given ValidationContext.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParamsMethods inherited from interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition
getType
-
Field Details
-
terms
-
composedPredicate
-
-
Constructor Details
-
CompositeLootItemCondition
protected CompositeLootItemCondition(List<LootItemCondition> pTerms, Predicate<LootContext> pComposedPredicate)
-
-
Method Details
-
createCodec
protected static <T extends CompositeLootItemCondition> com.mojang.serialization.MapCodec<T> createCodec(Function<List<LootItemCondition>, T> pFactory) -
createInlineCodec
protected static <T extends CompositeLootItemCondition> com.mojang.serialization.Codec<T> createInlineCodec(Function<List<LootItemCondition>, T> pFactory) -
test
- Specified by:
testin interfacePredicate<LootContext>
-
validate
Validate that this object is used correctly according to the given ValidationContext.- Specified by:
validatein interfaceLootContextUser
-