Class RecipeMatcher<T>

java.lang.Object
net.minecraft.recipe.RecipeMatcher<T>

public class RecipeMatcher<T> extends Object
Matching class that matches a recipe to its required resources. This specifically does not check patterns (See ShapedRecipe for that).
Mappings:
Namespace Name
named net/minecraft/recipe/RecipeMatcher
intermediary net/minecraft/class_1662
official cpc
  • Field Details Link icon

    • available Link icon

      public final Reference2IntOpenHashMap<T> available
      Mappings:
      Namespace Name Mixin selector
      named available Lnet/minecraft/recipe/RecipeMatcher;available:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;
      intermediary field_52504 Lnet/minecraft/class_1662;field_52504:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;
      official a Lcpc;a:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;
  • Constructor Details Link icon

    • RecipeMatcher Link icon

      public RecipeMatcher()
  • Method Details Link icon

    • hasAtLeast Link icon

      boolean hasAtLeast(T input, int minimum)
      Mappings:
      Namespace Name Mixin selector
      named hasAtLeast Lnet/minecraft/recipe/RecipeMatcher;hasAtLeast(Ljava/lang/Object;I)Z
      intermediary method_61503 Lnet/minecraft/class_1662;method_61503(Ljava/lang/Object;I)Z
      official b Lcpc;b(Ljava/lang/Object;I)Z
    • consume Link icon

      void consume(T input, int count)
      Consumes a resource from the pool of available items.
      Parameters:
      count - the number of times that item must be consumed
      Mappings:
      Namespace Name Mixin selector
      named consume Lnet/minecraft/recipe/RecipeMatcher;consume(Ljava/lang/Object;I)V
      intermediary method_7411 Lnet/minecraft/class_1662;method_7411(Ljava/lang/Object;I)V
      official c Lcpc;c(Ljava/lang/Object;I)V
    • addInput Link icon

      void addInput(T input, int count)
      Adds an input to be used for recipe matching.
      Parameters:
      count - the item's count
      Mappings:
      Namespace Name Mixin selector
      named addInput Lnet/minecraft/recipe/RecipeMatcher;addInput(Ljava/lang/Object;I)V
      intermediary method_7401 Lnet/minecraft/class_1662;method_7401(Ljava/lang/Object;I)V
      official d Lcpc;d(Ljava/lang/Object;I)V
    • match Link icon

      public boolean match(List<? extends RecipeMatcher.RawIngredient<T>> ingredients, int quantity, @Nullable @Nullable RecipeMatcher.ItemCallback<T> itemCallback)
      Mappings:
      Namespace Name Mixin selector
      named match Lnet/minecraft/recipe/RecipeMatcher;match(Ljava/util/List;ILnet/minecraft/recipe/RecipeMatcher$ItemCallback;)Z
      intermediary method_61502 Lnet/minecraft/class_1662;method_61502(Ljava/util/List;ILnet/minecraft/class_1662$class_9874;)Z
      official a Lcpc;a(Ljava/util/List;ILcpc$b;)Z
    • countCrafts Link icon

      public int countCrafts(List<? extends RecipeMatcher.RawIngredient<T>> ingredients, int max, @Nullable @Nullable RecipeMatcher.ItemCallback<T> itemCallback)
      Mappings:
      Namespace Name Mixin selector
      named countCrafts Lnet/minecraft/recipe/RecipeMatcher;countCrafts(Ljava/util/List;ILnet/minecraft/recipe/RecipeMatcher$ItemCallback;)I
      intermediary method_61504 Lnet/minecraft/class_1662;method_61504(Ljava/util/List;ILnet/minecraft/class_1662$class_9874;)I
      official b Lcpc;b(Ljava/util/List;ILcpc$b;)I
    • clear Link icon

      public void clear()
      Mappings:
      Namespace Name Mixin selector
      named clear Lnet/minecraft/recipe/RecipeMatcher;clear()V
      intermediary method_7409 Lnet/minecraft/class_1662;method_7409()V
      official a Lcpc;a()V
    • add Link icon

      public void add(T input, int count)
      Mappings:
      Namespace Name Mixin selector
      named add Lnet/minecraft/recipe/RecipeMatcher;add(Ljava/lang/Object;I)V
      intermediary method_61501 Lnet/minecraft/class_1662;method_61501(Ljava/lang/Object;I)V
      official a Lcpc;a(Ljava/lang/Object;I)V
    • createItemRequirementList Link icon

      List<T> createItemRequirementList(Iterable<? extends RecipeMatcher.RawIngredient<T>> ingredients)
      Mappings:
      Namespace Name Mixin selector
      named createItemRequirementList Lnet/minecraft/recipe/RecipeMatcher;createItemRequirementList(Ljava/lang/Iterable;)Ljava/util/List;
      intermediary method_65794 Lnet/minecraft/class_1662;method_65794(Ljava/lang/Iterable;)Ljava/util/List;
      official a Lcpc;a(Ljava/lang/Iterable;)Ljava/util/List;
    • anyAccept Link icon

      private static <T> boolean anyAccept(Iterable<? extends RecipeMatcher.RawIngredient<T>> ingredients, T item)
      Mappings:
      Namespace Name Mixin selector
      named anyAccept Lnet/minecraft/recipe/RecipeMatcher;anyAccept(Ljava/lang/Iterable;Ljava/lang/Object;)Z
      intermediary method_65795 Lnet/minecraft/class_1662;method_65795(Ljava/lang/Iterable;Ljava/lang/Object;)Z
      official a Lcpc;a(Ljava/lang/Iterable;Ljava/lang/Object;)Z
    • getMaximumCrafts Link icon

      public int getMaximumCrafts(List<? extends RecipeMatcher.RawIngredient<T>> ingredients)
      Mappings:
      Namespace Name Mixin selector
      named getMaximumCrafts Lnet/minecraft/recipe/RecipeMatcher;getMaximumCrafts(Ljava/util/List;)I
      intermediary method_65796 Lnet/minecraft/class_1662;method_65796(Ljava/util/List;)I
      official a Lcpc;a(Ljava/util/List;)I