Package net.minecraft.recipe
Interface Recipe<C extends Inventory>
- All Known Subinterfaces:
CraftingRecipe
- All Known Implementing Classes:
AbstractCookingRecipe,ArmorDyeRecipe,BannerDuplicateRecipe,BlastingRecipe,BookCloningRecipe,CampfireCookingRecipe,CuttingRecipe,FireworkRocketRecipe,FireworkStarFadeRecipe,FireworkStarRecipe,MapCloningRecipe,MapExtendingRecipe,RepairItemRecipe,ShapedRecipe,ShapelessRecipe,ShieldDecorationRecipe,ShulkerBoxColoringRecipe,SmeltingRecipe,SmithingRecipe,SmokingRecipe,SpecialCraftingRecipe,StonecuttingRecipe,SuspiciousStewRecipe,TippedArrowRecipe
public interface Recipe<C extends Inventory>
- Mappings:
Namespace Name official bthintermediary net/minecraft/class_1860named net/minecraft/recipe/Recipe
-
Method Summary
Modifier and TypeMethodDescriptionCrafts this recipe.default ItemStackCreates the stack that is displayed on the recipe book tab containing this recipe, and on a toast when a recipe of this type is unlocked.booleanfits(int width, int height)Determines whether this recipe's pattern will fit into the available crafting area.default StringgetGroup()Optional group this recipe belongs in.getId()default DefaultedList<Ingredient>The ingredients accepted as inputs for this recipe.default DefaultedList<ItemStack>getRemainder(C inventory)Returns the remaining stacks to be left in the crafting grid after crafting is complete.RecipeType<?>getType()default booleanisEmpty()default booleanbooleanDetermines whether this recipe matches the contents currently placed inside the available crafting grid.
-
Method Details
-
matches
Determines whether this recipe matches the contents currently placed inside the available crafting grid.- Mappings:
Namespace Name Mixin selector official aLbth;a(Lart;Lbwp;)Zintermediary method_8115Lnet/minecraft/class_1860;method_8115(Lnet/minecraft/class_1263;Lnet/minecraft/class_1937;)Znamed matchesLnet/minecraft/recipe/Recipe;matches(Lnet/minecraft/inventory/Inventory;Lnet/minecraft/world/World;)Z
-
craft
Crafts this recipe.This method may perform side effects on the
inventoryargument.This method should return a new item stack on each call.
- Returns:
- the resulting item stack
- Mappings:
Namespace Name Mixin selector official aLbth;a(Lart;)Lbqp;intermediary method_8116Lnet/minecraft/class_1860;method_8116(Lnet/minecraft/class_1263;)Lnet/minecraft/class_1799;named craftLnet/minecraft/recipe/Recipe;craft(Lnet/minecraft/inventory/Inventory;)Lnet/minecraft/item/ItemStack;
-
fits
boolean fits(int width, int height)Determines whether this recipe's pattern will fit into the available crafting area.- Mappings:
Namespace Name Mixin selector official aLbth;a(II)Zintermediary method_8113Lnet/minecraft/class_1860;method_8113(II)Znamed fitsLnet/minecraft/recipe/Recipe;fits(II)Z
-
getOutput
ItemStack getOutput()- Mappings:
Namespace Name Mixin selector official cLbth;c()Lbqp;intermediary method_8110Lnet/minecraft/class_1860;method_8110()Lnet/minecraft/class_1799;named getOutputLnet/minecraft/recipe/Recipe;getOutput()Lnet/minecraft/item/ItemStack;
-
getRemainder
Returns the remaining stacks to be left in the crafting grid after crafting is complete. Should return the same number of items as the input grid contains in the same order they're expected to appear in that grid.- Implementation Requirements:
- Default implementation simply returns a grid of all empty stacks where all stacks from the
input grid have been replaced with the result of calling
Item.getRecipeRemainder()on them. - Mappings:
Namespace Name Mixin selector official bLbth;b(Lart;)Lgs;intermediary method_8111Lnet/minecraft/class_1860;method_8111(Lnet/minecraft/class_1263;)Lnet/minecraft/class_2371;named getRemainderLnet/minecraft/recipe/Recipe;getRemainder(Lnet/minecraft/inventory/Inventory;)Lnet/minecraft/util/collection/DefaultedList;
-
getIngredients
The ingredients accepted as inputs for this recipe. Used by the recipe book when displaying a ghost form of this recipe on the crafting grid as well as for previewing the possible inputs in the book itself.- Mappings:
Namespace Name Mixin selector official aLbth;a()Lgs;intermediary method_8117Lnet/minecraft/class_1860;method_8117()Lnet/minecraft/class_2371;named getIngredientsLnet/minecraft/recipe/Recipe;getIngredients()Lnet/minecraft/util/collection/DefaultedList;
-
isIgnoredInRecipeBook
default boolean isIgnoredInRecipeBook()- Mappings:
Namespace Name Mixin selector official Q_Lbth;Q_()Zintermediary method_8118Lnet/minecraft/class_1860;method_8118()Znamed isIgnoredInRecipeBookLnet/minecraft/recipe/Recipe;isIgnoredInRecipeBook()Z
-
getGroup
Optional group this recipe belongs in. Used to group recipes into different categories by the recipe book.- Mappings:
Namespace Name Mixin selector official dLbth;d()Ljava/lang/String;intermediary method_8112Lnet/minecraft/class_1860;method_8112()Ljava/lang/String;named getGroupLnet/minecraft/recipe/Recipe;getGroup()Ljava/lang/String;
-
createIcon
Creates the stack that is displayed on the recipe book tab containing this recipe, and on a toast when a recipe of this type is unlocked. Used in conjunction withgetGroup().- Mappings:
Namespace Name Mixin selector official hLbth;h()Lbqp;intermediary method_17447Lnet/minecraft/class_1860;method_17447()Lnet/minecraft/class_1799;named createIconLnet/minecraft/recipe/Recipe;createIcon()Lnet/minecraft/item/ItemStack;
-
getId
Identifier getId()- Mappings:
Namespace Name Mixin selector official fLbth;f()Lww;intermediary method_8114Lnet/minecraft/class_1860;method_8114()Lnet/minecraft/class_2960;named getIdLnet/minecraft/recipe/Recipe;getId()Lnet/minecraft/util/Identifier;
-
getSerializer
RecipeSerializer<?> getSerializer()- Mappings:
Namespace Name Mixin selector official R_Lbth;R_()Lbtj;intermediary method_8119Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;named getSerializerLnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;
-
getType
RecipeType<?> getType()- Mappings:
Namespace Name Mixin selector official gLbth;g()Lbtk;intermediary method_17716Lnet/minecraft/class_1860;method_17716()Lnet/minecraft/class_3956;named getTypeLnet/minecraft/recipe/Recipe;getType()Lnet/minecraft/recipe/RecipeType;
-
isEmpty
default boolean isEmpty()- Mappings:
Namespace Name Mixin selector official iLbth;i()Zintermediary method_31584Lnet/minecraft/class_1860;method_31584()Znamed isEmptyLnet/minecraft/recipe/Recipe;isEmpty()Z
-