Package net.minecraft.recipe
Class RecipeMatcher<T>
java.lang.Object
net.minecraft.recipe.RecipeMatcher<T>
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/RecipeMatcherintermediary net/minecraft/class_1662official cqa
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceprivate classstatic final record -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) voidAdds an input to be used for recipe matching.voidclear()(package private) voidConsumes a resource from the pool of available items.intcountCrafts(List<RecipeMatcher.RawIngredient<T>> ingredients, int max, @Nullable RecipeMatcher.ItemCallback<T> itemCallback) (package private) boolean(package private) booleanhasAtLeast(T input, int minimum) booleanmatch(List<RecipeMatcher.RawIngredient<T>> ingredients, int quantity, @Nullable RecipeMatcher.ItemCallback<T> itemCallback)
-
Field Details
-
available
- Mappings:
Namespace Name Mixin selector named availableLnet/minecraft/recipe/RecipeMatcher;available:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;intermediary field_52504Lnet/minecraft/class_1662;field_52504:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;official aLcqa;a:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;
-
-
Constructor Details
-
RecipeMatcher
public RecipeMatcher()
-
-
Method Details
-
hasAny
- Mappings:
Namespace Name Mixin selector named hasAnyLnet/minecraft/recipe/RecipeMatcher;hasAny(Ljava/lang/Object;)Zintermediary method_61500Lnet/minecraft/class_1662;method_61500(Ljava/lang/Object;)Zofficial aLcqa;a(Ljava/lang/Object;)Z
-
hasAtLeast
- Mappings:
Namespace Name Mixin selector named hasAtLeastLnet/minecraft/recipe/RecipeMatcher;hasAtLeast(Ljava/lang/Object;I)Zintermediary method_61503Lnet/minecraft/class_1662;method_61503(Ljava/lang/Object;I)Zofficial bLcqa;b(Ljava/lang/Object;I)Z
-
consume
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 consumeLnet/minecraft/recipe/RecipeMatcher;consume(Ljava/lang/Object;I)Vintermediary method_7411Lnet/minecraft/class_1662;method_7411(Ljava/lang/Object;I)Vofficial cLcqa;c(Ljava/lang/Object;I)V
-
addInput
Adds an input to be used for recipe matching.- Parameters:
count- the item's count- Mappings:
Namespace Name Mixin selector named addInputLnet/minecraft/recipe/RecipeMatcher;addInput(Ljava/lang/Object;I)Vintermediary method_7401Lnet/minecraft/class_1662;method_7401(Ljava/lang/Object;I)Vofficial dLcqa;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 matchLnet/minecraft/recipe/RecipeMatcher;match(Ljava/util/List;ILnet/minecraft/recipe/RecipeMatcher$ItemCallback;)Zintermediary method_61502Lnet/minecraft/class_1662;method_61502(Ljava/util/List;ILnet/minecraft/class_1662$class_9874;)Zofficial aLcqa;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 countCraftsLnet/minecraft/recipe/RecipeMatcher;countCrafts(Ljava/util/List;ILnet/minecraft/recipe/RecipeMatcher$ItemCallback;)Iintermediary method_61504Lnet/minecraft/class_1662;method_61504(Ljava/util/List;ILnet/minecraft/class_1662$class_9874;)Iofficial bLcqa;b(Ljava/util/List;ILcqa$b;)I
-
clear
public void clear()- Mappings:
Namespace Name Mixin selector named clearLnet/minecraft/recipe/RecipeMatcher;clear()Vintermediary method_7409Lnet/minecraft/class_1662;method_7409()Vofficial aLcqa;a()V
-
add
- Mappings:
Namespace Name Mixin selector named addLnet/minecraft/recipe/RecipeMatcher;add(Ljava/lang/Object;I)Vintermediary method_61501Lnet/minecraft/class_1662;method_61501(Ljava/lang/Object;I)Vofficial aLcqa;a(Ljava/lang/Object;I)V
-