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 cqa
  • Field Details

    • available

      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 Lcqa;a:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;
  • Constructor Details

    • RecipeMatcher

      public RecipeMatcher()
  • Method Details

    • hasAny

      boolean hasAny(T input)
      Mappings:
      Namespace Name Mixin selector
      named hasAny Lnet/minecraft/recipe/RecipeMatcher;hasAny(Ljava/lang/Object;)Z
      intermediary method_61500 Lnet/minecraft/class_1662;method_61500(Ljava/lang/Object;)Z
      official a Lcqa;a(Ljava/lang/Object;)Z
    • hasAtLeast

      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 Lcqa;b(Ljava/lang/Object;I)Z
    • consume

      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 Lcqa;c(Ljava/lang/Object;I)V
    • addInput

      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 Lcqa;d(Ljava/lang/Object;I)V
    • match

      public boolean match(List<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 Lcqa;a(Ljava/util/List;ILcqa$b;)Z
    • countCrafts

      public int countCrafts(List<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 Lcqa;b(Ljava/util/List;ILcqa$b;)I
    • clear

      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 Lcqa;a()V
    • add

      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 Lcqa;a(Ljava/lang/Object;I)V