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

    • RecipeMatcher

      public RecipeMatcher()
  • Method Details

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

      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 Lcuy;a(Ljava/util/List;ILcuy$b;)Z
    • countCrafts

      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 Lcuy;b(Ljava/util/List;ILcuy$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 Lcuy;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 Lcuy;a(Ljava/lang/Object;I)V
    • createItemRequirementList

      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 Lcuy;a(Ljava/lang/Iterable;)Ljava/util/List;
    • anyAccept

      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 Lcuy;a(Ljava/lang/Iterable;Ljava/lang/Object;)Z
    • getMaximumCrafts

      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 Lcuy;a(Ljava/util/List;)I