Class EnchantmentsPredicate

java.lang.Object
net.minecraft.predicate.item.EnchantmentsPredicate
All Implemented Interfaces:
ComponentSubPredicate<ItemEnchantmentsComponent>, ItemSubPredicate
Direct Known Subclasses:
EnchantmentsPredicate.Enchantments, EnchantmentsPredicate.StoredEnchantments

public abstract class EnchantmentsPredicate extends Object implements ComponentSubPredicate<ItemEnchantmentsComponent>
Mappings:
Namespace Name
named net/minecraft/predicate/item/EnchantmentsPredicate
intermediary net/minecraft/class_9356
official cp
  • Field Details

    • enchantments

      private final List<EnchantmentPredicate> enchantments
      Mappings:
      Namespace Name Mixin selector
      named enchantments Lnet/minecraft/predicate/item/EnchantmentsPredicate;enchantments:Ljava/util/List;
      intermediary field_49799 Lnet/minecraft/class_9356;field_49799:Ljava/util/List;
      official a Lcp;a:Ljava/util/List;
  • Constructor Details

    • EnchantmentsPredicate

      protected EnchantmentsPredicate(List<EnchantmentPredicate> enchantments)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/predicate/item/EnchantmentsPredicate;<init>(Ljava/util/List;)V
      intermediary <init> Lnet/minecraft/class_9356;<init>(Ljava/util/List;)V
      official <init> Lcp;<init>(Ljava/util/List;)V
  • Method Details

    • createCodec

      public static <T extends EnchantmentsPredicate> com.mojang.serialization.Codec<T> createCodec(Function<List<EnchantmentPredicate>,T> predicateFunction)
      Mappings:
      Namespace Name Mixin selector
      named createCodec Lnet/minecraft/predicate/item/EnchantmentsPredicate;createCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      intermediary method_58174 Lnet/minecraft/class_9356;method_58174(Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      official a Lcp;a(Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
    • getEnchantments

      protected List<EnchantmentPredicate> getEnchantments()
      Mappings:
      Namespace Name Mixin selector
      named getEnchantments Lnet/minecraft/predicate/item/EnchantmentsPredicate;getEnchantments()Ljava/util/List;
      intermediary method_58175 Lnet/minecraft/class_9356;method_58175()Ljava/util/List;
      official b Lcp;b()Ljava/util/List;
    • test

      public boolean test(ItemStack itemStack, ItemEnchantmentsComponent itemEnchantmentsComponent)
      Specified by:
      test in interface ComponentSubPredicate<ItemEnchantmentsComponent>
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/predicate/item/EnchantmentsPredicate;test(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/ItemEnchantmentsComponent;)Z
      intermediary method_58172 Lnet/minecraft/class_9356;method_58172(Lnet/minecraft/class_1799;Lnet/minecraft/class_9304;)Z
      official a Lcp;a(Lcxo;Ldee;)Z
    • enchantments

      public static EnchantmentsPredicate.Enchantments enchantments(List<EnchantmentPredicate> enchantments)
      Mappings:
      Namespace Name Mixin selector
      named enchantments Lnet/minecraft/predicate/item/EnchantmentsPredicate;enchantments(Ljava/util/List;)Lnet/minecraft/predicate/item/EnchantmentsPredicate$Enchantments;
      intermediary method_58173 Lnet/minecraft/class_9356;method_58173(Ljava/util/List;)Lnet/minecraft/class_9356$class_9357;
      official a Lcp;a(Ljava/util/List;)Lcp$a;
    • storedEnchantments

      public static EnchantmentsPredicate.StoredEnchantments storedEnchantments(List<EnchantmentPredicate> storedEnchantments)
      Mappings:
      Namespace Name Mixin selector
      named storedEnchantments Lnet/minecraft/predicate/item/EnchantmentsPredicate;storedEnchantments(Ljava/util/List;)Lnet/minecraft/predicate/item/EnchantmentsPredicate$StoredEnchantments;
      intermediary method_58176 Lnet/minecraft/class_9356;method_58176(Ljava/util/List;)Lnet/minecraft/class_9356$class_9358;
      official b Lcp;b(Ljava/util/List;)Lcp$b;