Package net.minecraft.recipe
Class RecipeMatcher
java.lang.Object
net.minecraft.recipe.RecipeMatcher
Matching class that matches a recipe to its required resources.
 This specifically does not check patterns (See 
ShapedRecipe for that).- Mappings:
- Namespace - Name - official - bys- intermediary - net/minecraft/class_1662- named - net/minecraft/recipe/RecipeMatcher
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription(package private) voidaddInput(int itemId, int count) Adds an input to be used for recipe matching.voidAdds a full item stack to the pool of available resources.voidAdds an item stack to the pool of available resources.voidaddUnenchantedInput(ItemStack stack) Adds a full item stack to the pool of available resources.voidclear()(package private) intconsume(int itemId, int count) Consumes a resource from the pool of available items.(package private) booleancontains(int itemId) Determines whether a raw item id is present in the pool of crafting resources.intcountCrafts(Recipe<?> recipe, int limit, @Nullable IntList output) Determines the number of crafts that can be produced for a recipe using the collected resources available to this crafter.intcountCrafts(Recipe<?> recipe, @Nullable IntList output) Determines the number of crafts that can be produced for a recipe using the collected resources available to this crafter.static intstatic ItemStackgetStackFromId(int itemId) booleanAttempts to match the recipe against the collected inputs.booleanAttempts to match the recipe against the collected inputs.
- 
Field Details- 
field_30653private static final int field_30653- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lbys;b:I- intermediary - field_30653- Lnet/minecraft/class_1662;field_30653:I- named - field_30653- Lnet/minecraft/recipe/RecipeMatcher;field_30653:I
 
- 
inputs- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a:Lit/unimi/dsi/fastutil/ints/Int2IntMap;- intermediary - field_7550- Lnet/minecraft/class_1662;field_7550:Lit/unimi/dsi/fastutil/ints/Int2IntMap;- named - inputs- Lnet/minecraft/recipe/RecipeMatcher;inputs:Lit/unimi/dsi/fastutil/ints/Int2IntMap;
 
 
- 
- 
Constructor Details- 
RecipeMatcherpublic RecipeMatcher()
 
- 
- 
Method Details- 
addUnenchantedInputAdds a full item stack to the pool of available resources.This is equivalent to calling addInput(stack, Item.DEFAULT_MAX_COUNT).- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a(Lcfz;)V- intermediary - method_7404- Lnet/minecraft/class_1662;method_7404(Lnet/minecraft/class_1799;)V- named - addUnenchantedInput- Lnet/minecraft/recipe/RecipeMatcher;addUnenchantedInput(Lnet/minecraft/item/ItemStack;)V
 
- 
addInputAdds a full item stack to the pool of available resources.This is equivalent to calling addInput(stack, Item.DEFAULT_MAX_COUNT).- Mappings:
- Namespace - Name - Mixin selector - official - b- Lbys;b(Lcfz;)V- intermediary - method_7400- Lnet/minecraft/class_1662;method_7400(Lnet/minecraft/class_1799;)V- named - addInput- Lnet/minecraft/recipe/RecipeMatcher;addInput(Lnet/minecraft/item/ItemStack;)V
 
- 
addInputAdds an item stack to the pool of available resources.- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a(Lcfz;I)V- intermediary - method_20478- Lnet/minecraft/class_1662;method_20478(Lnet/minecraft/class_1799;I)V- named - addInput- Lnet/minecraft/recipe/RecipeMatcher;addInput(Lnet/minecraft/item/ItemStack;I)V
 
- 
getItemId- Mappings:
- Namespace - Name - Mixin selector - official - c- Lbys;c(Lcfz;)I- intermediary - method_7408- Lnet/minecraft/class_1662;method_7408(Lnet/minecraft/class_1799;)I- named - getItemId- Lnet/minecraft/recipe/RecipeMatcher;getItemId(Lnet/minecraft/item/ItemStack;)I
 
- 
containsboolean contains(int itemId) Determines whether a raw item id is present in the pool of crafting resources.- Mappings:
- Namespace - Name - Mixin selector - official - b- Lbys;b(I)Z- intermediary - method_7410- Lnet/minecraft/class_1662;method_7410(I)Z- named - contains- Lnet/minecraft/recipe/RecipeMatcher;contains(I)Z
 
- 
consumeint consume(int itemId, int count) Consumes a resource from the pool of available items.- Parameters:
- itemId- the raw id of the item being consumed
- count- the number of times that item must be consumed
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a(II)I- intermediary - method_7411- Lnet/minecraft/class_1662;method_7411(II)I- named - consume- Lnet/minecraft/recipe/RecipeMatcher;consume(II)I
 
- 
addInputvoid addInput(int itemId, int count) Adds an input to be used for recipe matching.- Parameters:
- itemId- the raw ID of the item to match
- count- the item's count
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lbys;b(II)V- intermediary - method_7401- Lnet/minecraft/class_1662;method_7401(II)V- named - addInput- Lnet/minecraft/recipe/RecipeMatcher;addInput(II)V
 
- 
matchAttempts to match the recipe against the collected inputs. Assumes only one output is required.- Parameters:
- recipe- the recipe to match against
- output- optional output list of item ids that were matched whilst evaluating the recipe conditions
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a(Lcjc;Lit/unimi/dsi/fastutil/ints/IntList;)Z- intermediary - method_7402- Lnet/minecraft/class_1662;method_7402(Lnet/minecraft/class_1860;Lit/unimi/dsi/fastutil/ints/IntList;)Z- named - match- Lnet/minecraft/recipe/RecipeMatcher;match(Lnet/minecraft/recipe/Recipe;Lit/unimi/dsi/fastutil/ints/IntList;)Z
 
- 
matchAttempts to match the recipe against the collected inputs. Will only succeed if there has been enough resources gathered to produce the requested number of outputs.- Parameters:
- recipe- the recipe to match against
- output- optional output list of item ids that were matched whilst evaluating the recipe conditions
- multiplier- the number of expected outputs
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a(Lcjc;Lit/unimi/dsi/fastutil/ints/IntList;I)Z- intermediary - method_7406- Lnet/minecraft/class_1662;method_7406(Lnet/minecraft/class_1860;Lit/unimi/dsi/fastutil/ints/IntList;I)Z- named - match- Lnet/minecraft/recipe/RecipeMatcher;match(Lnet/minecraft/recipe/Recipe;Lit/unimi/dsi/fastutil/ints/IntList;I)Z
 
- 
countCraftsDetermines the number of crafts that can be produced for a recipe using the collected resources available to this crafter.- Parameters:
- recipe- the recipe to match against
- output- optional output list of item ids that were matched whilst evaluating the recipe conditions
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lbys;b(Lcjc;Lit/unimi/dsi/fastutil/ints/IntList;)I- intermediary - method_7407- Lnet/minecraft/class_1662;method_7407(Lnet/minecraft/class_1860;Lit/unimi/dsi/fastutil/ints/IntList;)I- named - countCrafts- Lnet/minecraft/recipe/RecipeMatcher;countCrafts(Lnet/minecraft/recipe/Recipe;Lit/unimi/dsi/fastutil/ints/IntList;)I
 
- 
countCraftsDetermines the number of crafts that can be produced for a recipe using the collected resources available to this crafter.- Parameters:
- recipe- the recipe to match against
- output- optional output list of item ids that were matched whilst evaluating the recipe conditions
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a(Lcjc;ILit/unimi/dsi/fastutil/ints/IntList;)I- intermediary - method_7403- Lnet/minecraft/class_1662;method_7403(Lnet/minecraft/class_1860;ILit/unimi/dsi/fastutil/ints/IntList;)I- named - countCrafts- Lnet/minecraft/recipe/RecipeMatcher;countCrafts(Lnet/minecraft/recipe/Recipe;ILit/unimi/dsi/fastutil/ints/IntList;)I
 
- 
getStackFromId- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a(I)Lcfz;- intermediary - method_7405- Lnet/minecraft/class_1662;method_7405(I)Lnet/minecraft/class_1799;- named - getStackFromId- Lnet/minecraft/recipe/RecipeMatcher;getStackFromId(I)Lnet/minecraft/item/ItemStack;
 
- 
clearpublic void clear()- Mappings:
- Namespace - Name - Mixin selector - official - a- Lbys;a()V- intermediary - method_7409- Lnet/minecraft/class_1662;method_7409()V- named - clear- Lnet/minecraft/recipe/RecipeMatcher;clear()V
 
 
-