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/RecipeMatcher
intermediary net/minecraft/class_1662
official cqa
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
private class
static final record
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
(package private) void
Adds an input to be used for recipe matching.void
clear()
(package private) void
Consumes a resource from the pool of available items.int
countCrafts
(List<RecipeMatcher.RawIngredient<T>> ingredients, int max, @Nullable RecipeMatcher.ItemCallback<T> itemCallback) (package private) boolean
(package private) boolean
hasAtLeast
(T input, int minimum) boolean
match
(List<RecipeMatcher.RawIngredient<T>> ingredients, int quantity, @Nullable RecipeMatcher.ItemCallback<T> itemCallback)
-
Field Details
-
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
- 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
- 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
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
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
- 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
-