Class EnchantmentsPredicate
java.lang.Object
net.minecraft.core.component.predicates.EnchantmentsPredicate
- All Implemented Interfaces:
SingleComponentItemPredicate<ItemEnchantments>, DataComponentPredicate
- Direct Known Subclasses:
EnchantmentsPredicate.Enchantments, EnchantmentsPredicate.StoredEnchantments
public abstract class EnchantmentsPredicate
extends Object
implements SingleComponentItemPredicate<ItemEnchantments>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface DataComponentPredicate
DataComponentPredicate.AnyValueType, DataComponentPredicate.ConcreteType<T>, DataComponentPredicate.Single<T>, DataComponentPredicate.Type<T>, DataComponentPredicate.TypeBase<T> -
Field Summary
FieldsFields inherited from interface DataComponentPredicate
CODEC, SINGLE_STREAM_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEnchantmentsPredicate(List<EnchantmentPredicate> enchantments) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends EnchantmentsPredicate>
com.mojang.serialization.Codec<T> codec(Function<List<EnchantmentPredicate>, T> constructor) protected List<EnchantmentPredicate> enchantments(List<EnchantmentPredicate> predicates) booleanmatches(ItemEnchantments appliedEnchantments) storedEnchantments(List<EnchantmentPredicate> predicates) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SingleComponentItemPredicate
componentType, matches
-
Field Details
-
enchantments
-
-
Constructor Details
-
EnchantmentsPredicate
-
-
Method Details
-
codec
public static <T extends EnchantmentsPredicate> com.mojang.serialization.Codec<T> codec(Function<List<EnchantmentPredicate>, T> constructor) -
enchantments
-
matches
- Specified by:
matchesin interfaceSingleComponentItemPredicate<ItemEnchantments>
-
enchantments
public static EnchantmentsPredicate.Enchantments enchantments(List<EnchantmentPredicate> predicates) -
storedEnchantments
public static EnchantmentsPredicate.StoredEnchantments storedEnchantments(List<EnchantmentPredicate> predicates)
-