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 cpc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
private class
static interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
(package private) void
Adds an input to be used for recipe matching.private static <T> boolean
anyAccept
(Iterable<? extends RecipeMatcher.RawIngredient<T>> ingredients, T item) void
clear()
(package private) void
Consumes a resource from the pool of available items.int
countCrafts
(List<? extends RecipeMatcher.RawIngredient<T>> ingredients, int max, @Nullable RecipeMatcher.ItemCallback<T> itemCallback) createItemRequirementList
(Iterable<? extends RecipeMatcher.RawIngredient<T>> ingredients) int
getMaximumCrafts
(List<? extends RecipeMatcher.RawIngredient<T>> ingredients) (package private) boolean
hasAtLeast
(T input, int minimum) boolean
match
(List<? extends 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
Lcpc;a:Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap;
-
-
Constructor Details
-
Method Details
-
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
Lcpc;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
Lcpc;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
Lcpc;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
Lcpc;a(Ljava/util/List;ILcpc$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
Lcpc;b(Ljava/util/List;ILcpc$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
Lcpc;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
Lcpc;a(Ljava/lang/Object;I)V
-
createItemRequirementList
- 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
Lcpc;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
Lcpc;a(Ljava/lang/Iterable;Ljava/lang/Object;)Z
-
getMaximumCrafts
- 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
Lcpc;a(Ljava/util/List;)I
-