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 dex
  • Field Details Link icon

    • PACKET_CODEC Link icon

      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 Ldex;a:Lze;
    • OPTIONAL_PACKET_CODEC Link icon

      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 Ldex;b:Lze;
    • ENTRIES_CODEC Link icon

      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 Ldex;c:Lcom/mojang/serialization/Codec;
    • CODEC Link icon

      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 Ldex;d:Lcom/mojang/serialization/Codec;
    • entries Link icon

      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 Ldex;e:Ljk;
  • Constructor Details Link icon

    • Ingredient Link icon

      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> Ldex;<init>(Ljk;)V
  • Method Details Link icon

    • matches Link icon

      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 Ldex;a(Ljava/util/Optional;Ldak;)Z
    • getMatchingItems Link icon

      @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 Ldex;a()Ljava/util/stream/Stream;
    • isEmpty Link icon

      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 Ldex;b()Z
    • test Link icon

      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 Ldex;a(Ldak;)Z
    • acceptsItem Link icon

      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 Ldex;a(Ljg;)Z
    • equals Link icon

      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 Ldex;equals(Ljava/lang/Object;)Z
    • ofItem Link icon

      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 Ldex;a(Ldki;)Ldex;
    • ofItems Link icon

      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 Ldex;a([Ldki;)Ldex;
    • ofItems Link icon

      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 Ldex;a(Ljava/util/stream/Stream;)Ldex;
    • fromTag Link icon

      public static Ingredient fromTag(RegistryEntryList<Item> tag)
      Mappings:
      Namespace Name Mixin selector
      named fromTag Lnet/minecraft/recipe/Ingredient;fromTag(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 Ldex;a(Ljk;)Ldex;
    • toDisplay Link icon

      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 Ldex;c()Ldgn;
    • toDisplay Link icon

      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 Ldex;a(Ljava/util/Optional;)Ldgn;
    • createDisplayWithRemainder Link icon

      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 Ldex;b(Ljg;)Ldgn;