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 net.minecraft.core.component.predicates.DataComponentPredicate
DataComponentPredicate.Single<T extends DataComponentPredicate>, DataComponentPredicate.Type<T extends DataComponentPredicate> -
Field Summary
FieldsFields inherited from interface net.minecraft.core.component.predicates.DataComponentPredicate
CODEC, SINGLE_STREAM_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEnchantmentsPredicate(List<EnchantmentPredicate> pEnchantments) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends EnchantmentsPredicate>
com.mojang.serialization.Codec<T> codec(Function<List<EnchantmentPredicate>, T> pFactory) protected List<EnchantmentPredicate> enchantments(List<EnchantmentPredicate> pEnchantments) booleanmatches(ItemEnchantments p_399718_) storedEnchantments(List<EnchantmentPredicate> pStoreEnchantments) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.advancements.critereon.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> pFactory) -
enchantments
-
matches
- Specified by:
matchesin interfaceSingleComponentItemPredicate<ItemEnchantments>
-
enchantments
public static EnchantmentsPredicate.Enchantments enchantments(List<EnchantmentPredicate> pEnchantments) -
storedEnchantments
public static EnchantmentsPredicate.StoredEnchantments storedEnchantments(List<EnchantmentPredicate> pStoreEnchantments)
-