Class Ingredient

java.lang.Object
net.minecraft.recipe.Ingredient
All Implemented Interfaces:
Predicate<ItemStack>, RecipeMatcher.RawIngredient<RegistryEntry<Item>>

public final class Ingredient extends Object implements RecipeMatcher.RawIngredient<RegistryEntry<Item>>, Predicate<ItemStack>
Mappings:
Namespace Name
named net/minecraft/recipe/Ingredient
intermediary net/minecraft/class_1856
official dhi
  • Field Details

    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,Ingredient> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/recipe/Ingredient;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48355 Lnet/minecraft/class_1856;field_48355:Lnet/minecraft/class_9139;
      official a Ldhi;a:Lzm;
    • OPTIONAL_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,Optional<Ingredient>> OPTIONAL_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named OPTIONAL_PACKET_CODEC Lnet/minecraft/recipe/Ingredient;OPTIONAL_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_52595 Lnet/minecraft/class_1856;field_52595:Lnet/minecraft/class_9139;
      official b Ldhi;b:Lzm;
    • ENTRIES_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntryList<Item>> ENTRIES_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRIES_CODEC Lnet/minecraft/recipe/Ingredient;ENTRIES_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_52596 Lnet/minecraft/class_1856;field_52596:Lcom/mojang/serialization/Codec;
      official c Ldhi;c:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<Ingredient> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/recipe/Ingredient;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_46095 Lnet/minecraft/class_1856;field_46095:Lcom/mojang/serialization/Codec;
      official d Ldhi;d:Lcom/mojang/serialization/Codec;
    • entries

      private final RegistryEntryList<Item> entries
      Mappings:
      Namespace Name Mixin selector
      named entries Lnet/minecraft/recipe/Ingredient;entries:Lnet/minecraft/registry/entry/RegistryEntryList;
      intermediary field_9019 Lnet/minecraft/class_1856;field_9019:Lnet/minecraft/class_6885;
      official e Ldhi;e:Ljp;
  • Constructor Details

    • Ingredient

      private Ingredient(RegistryEntryList<Item> entries)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/recipe/Ingredient;<init>(Lnet/minecraft/registry/entry/RegistryEntryList;)V
      intermediary <init> Lnet/minecraft/class_1856;<init>(Lnet/minecraft/class_6885;)V
      official <init> Ldhi;<init>(Ljp;)V
  • Method Details

    • matches

      public static boolean matches(Optional<Ingredient> ingredient, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named matches Lnet/minecraft/recipe/Ingredient;matches(Ljava/util/Optional;Lnet/minecraft/item/ItemStack;)Z
      intermediary method_61676 Lnet/minecraft/class_1856;method_61676(Ljava/util/Optional;Lnet/minecraft/class_1799;)Z
      official a Ldhi;a(Ljava/util/Optional;Ldcv;)Z
    • getMatchingItems

      @Deprecated public Stream<RegistryEntry<Item>> getMatchingItems()
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named getMatchingItems Lnet/minecraft/recipe/Ingredient;getMatchingItems()Ljava/util/stream/Stream;
      intermediary method_8105 Lnet/minecraft/class_1856;method_8105()Ljava/util/stream/Stream;
      official a Ldhi;a()Ljava/util/stream/Stream;
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      named isEmpty Lnet/minecraft/recipe/Ingredient;isEmpty()Z
      intermediary method_65799 Lnet/minecraft/class_1856;method_65799()Z
      official b Ldhi;b()Z
    • test

      public boolean test(ItemStack itemStack)
      Specified by:
      test in interface Predicate<ItemStack>
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/recipe/Ingredient;test(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_8093 Lnet/minecraft/class_1856;method_8093(Lnet/minecraft/class_1799;)Z
      official a Ldhi;a(Ldcv;)Z
    • acceptsItem

      public boolean acceptsItem(RegistryEntry<Item> registryEntry)
      Specified by:
      acceptsItem in interface RecipeMatcher.RawIngredient<RegistryEntry<Item>>
      Mappings:
      Namespace Name Mixin selector
      named acceptsItem Lnet/minecraft/recipe/Ingredient;acceptsItem(Lnet/minecraft/registry/entry/RegistryEntry;)Z
      intermediary method_65798 Lnet/minecraft/class_1856;method_65798(Lnet/minecraft/class_6880;)Z
      official a Ldhi;a(Ljl;)Z
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/recipe/Ingredient;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_1856;equals(Ljava/lang/Object;)Z
      official equals Ldhi;equals(Ljava/lang/Object;)Z
    • ofItem

      public static Ingredient ofItem(ItemConvertible item)
      Mappings:
      Namespace Name Mixin selector
      named ofItem Lnet/minecraft/recipe/Ingredient;ofItem(Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/recipe/Ingredient;
      intermediary method_8101 Lnet/minecraft/class_1856;method_8101(Lnet/minecraft/class_1935;)Lnet/minecraft/class_1856;
      official a Ldhi;a(Ldmt;)Ldhi;
    • ofItems

      public static Ingredient ofItems(ItemConvertible[] items)
      Mappings:
      Namespace Name Mixin selector
      named ofItems Lnet/minecraft/recipe/Ingredient;ofItems([Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/recipe/Ingredient;
      intermediary method_8091 Lnet/minecraft/class_1856;method_8091([Lnet/minecraft/class_1935;)Lnet/minecraft/class_1856;
      official a Ldhi;a([Ldmt;)Ldhi;
    • ofItems

      public static Ingredient ofItems(Stream<? extends ItemConvertible> stacks)
      Mappings:
      Namespace Name Mixin selector
      named ofItems Lnet/minecraft/recipe/Ingredient;ofItems(Ljava/util/stream/Stream;)Lnet/minecraft/recipe/Ingredient;
      intermediary method_26964 Lnet/minecraft/class_1856;method_26964(Ljava/util/stream/Stream;)Lnet/minecraft/class_1856;
      official a Ldhi;a(Ljava/util/stream/Stream;)Ldhi;
    • ofTag

      public static Ingredient ofTag(RegistryEntryList<Item> tag)
      Mappings:
      Namespace Name Mixin selector
      named ofTag Lnet/minecraft/recipe/Ingredient;ofTag(Lnet/minecraft/registry/entry/RegistryEntryList;)Lnet/minecraft/recipe/Ingredient;
      intermediary method_8106 Lnet/minecraft/class_1856;method_8106(Lnet/minecraft/class_6885;)Lnet/minecraft/class_1856;
      official a Ldhi;a(Ljp;)Ldhi;
    • toDisplay

      public SlotDisplay toDisplay()
      Mappings:
      Namespace Name Mixin selector
      named toDisplay Lnet/minecraft/recipe/Ingredient;toDisplay()Lnet/minecraft/recipe/display/SlotDisplay;
      intermediary method_64673 Lnet/minecraft/class_1856;method_64673()Lnet/minecraft/class_10302;
      official c Ldhi;c()Ldiy;
    • toDisplay

      public static SlotDisplay toDisplay(Optional<Ingredient> ingredient)
      Mappings:
      Namespace Name Mixin selector
      named toDisplay Lnet/minecraft/recipe/Ingredient;toDisplay(Ljava/util/Optional;)Lnet/minecraft/recipe/display/SlotDisplay;
      intermediary method_64980 Lnet/minecraft/class_1856;method_64980(Ljava/util/Optional;)Lnet/minecraft/class_10302;
      official a Ldhi;a(Ljava/util/Optional;)Ldiy;
    • createDisplayWithRemainder

      private static SlotDisplay createDisplayWithRemainder(RegistryEntry<Item> displayedItem)
      Mappings:
      Namespace Name Mixin selector
      named createDisplayWithRemainder Lnet/minecraft/recipe/Ingredient;createDisplayWithRemainder(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/recipe/display/SlotDisplay;
      intermediary method_64981 Lnet/minecraft/class_1856;method_64981(Lnet/minecraft/class_6880;)Lnet/minecraft/class_10302;
      official b Ldhi;b(Ljl;)Ldiy;