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 csn
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceprivate classstatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) voidAdds an input to be used for recipe matching.private static <T> booleananyAccept(Iterable<? extends RecipeMatcher.RawIngredient<T>> ingredients, T item) voidclear()(package private) voidConsumes a resource from the pool of available items.intcountCrafts(List<? extends RecipeMatcher.RawIngredient<T>> ingredients, int max, @Nullable RecipeMatcher.ItemCallback<T> itemCallback) createItemRequirementList(Iterable<? extends RecipeMatcher.RawIngredient<T>> ingredients) intgetMaximumCrafts(List<? extends RecipeMatcher.RawIngredient<T>> ingredients) (package private) booleanhasAtLeast(T input, int minimum) booleanmatch(List<? extends 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 aLcsn;a:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;
-
-
Constructor Details
-
RecipeMatcher
public RecipeMatcher()
-
-
Method Details
-
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 bLcsn;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 cLcsn;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 dLcsn;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 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 aLcsn;a(Ljava/util/List;ILcsn$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 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 bLcsn;b(Ljava/util/List;ILcsn$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 aLcsn;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 aLcsn;a(Ljava/lang/Object;I)V
-
createItemRequirementList
- Mappings:
Namespace Name Mixin selector named createItemRequirementListLnet/minecraft/recipe/RecipeMatcher;createItemRequirementList(Ljava/lang/Iterable;)Ljava/util/List;intermediary method_65794Lnet/minecraft/class_1662;method_65794(Ljava/lang/Iterable;)Ljava/util/List;official aLcsn;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 anyAcceptLnet/minecraft/recipe/RecipeMatcher;anyAccept(Ljava/lang/Iterable;Ljava/lang/Object;)Zintermediary method_65795Lnet/minecraft/class_1662;method_65795(Ljava/lang/Iterable;Ljava/lang/Object;)Zofficial aLcsn;a(Ljava/lang/Iterable;Ljava/lang/Object;)Z
-
getMaximumCrafts
- Mappings:
Namespace Name Mixin selector named getMaximumCraftsLnet/minecraft/recipe/RecipeMatcher;getMaximumCrafts(Ljava/util/List;)Iintermediary method_65796Lnet/minecraft/class_1662;method_65796(Ljava/util/List;)Iofficial aLcsn;a(Ljava/util/List;)I
-