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 bth
intermediary net/minecraft/class_1860
named net/minecraft/recipe/Recipe
  • Method Details

    • matches

      boolean matches(C inventory, World world)
      Determines whether this recipe matches the contents currently placed inside the available crafting grid.
      Mappings:
      Namespace Name Mixin selector
      official a Lbth;a(Lart;Lbwp;)Z
      intermediary method_8115 Lnet/minecraft/class_1860;method_8115(Lnet/minecraft/class_1263;Lnet/minecraft/class_1937;)Z
      named matches Lnet/minecraft/recipe/Recipe;matches(Lnet/minecraft/inventory/Inventory;Lnet/minecraft/world/World;)Z
    • craft

      ItemStack craft(C inventory)
      Crafts this recipe.

      This method may perform side effects on the inventory argument.

      This method should return a new item stack on each call.

      Returns:
      the resulting item stack
      Mappings:
      Namespace Name Mixin selector
      official a Lbth;a(Lart;)Lbqp;
      intermediary method_8116 Lnet/minecraft/class_1860;method_8116(Lnet/minecraft/class_1263;)Lnet/minecraft/class_1799;
      named craft Lnet/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 a Lbth;a(II)Z
      intermediary method_8113 Lnet/minecraft/class_1860;method_8113(II)Z
      named fits Lnet/minecraft/recipe/Recipe;fits(II)Z
    • getOutput

      ItemStack getOutput()
      Mappings:
      Namespace Name Mixin selector
      official c Lbth;c()Lbqp;
      intermediary method_8110 Lnet/minecraft/class_1860;method_8110()Lnet/minecraft/class_1799;
      named getOutput Lnet/minecraft/recipe/Recipe;getOutput()Lnet/minecraft/item/ItemStack;
    • getRemainder

      default DefaultedList<ItemStack> getRemainder(C inventory)
      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 b Lbth;b(Lart;)Lgs;
      intermediary method_8111 Lnet/minecraft/class_1860;method_8111(Lnet/minecraft/class_1263;)Lnet/minecraft/class_2371;
      named getRemainder Lnet/minecraft/recipe/Recipe;getRemainder(Lnet/minecraft/inventory/Inventory;)Lnet/minecraft/util/collection/DefaultedList;
    • getIngredients

      default DefaultedList<Ingredient> 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 a Lbth;a()Lgs;
      intermediary method_8117 Lnet/minecraft/class_1860;method_8117()Lnet/minecraft/class_2371;
      named getIngredients Lnet/minecraft/recipe/Recipe;getIngredients()Lnet/minecraft/util/collection/DefaultedList;
    • isIgnoredInRecipeBook

      default boolean isIgnoredInRecipeBook()
      Mappings:
      Namespace Name Mixin selector
      official Q_ Lbth;Q_()Z
      intermediary method_8118 Lnet/minecraft/class_1860;method_8118()Z
      named isIgnoredInRecipeBook Lnet/minecraft/recipe/Recipe;isIgnoredInRecipeBook()Z
    • getGroup

      default String getGroup()
      Optional group this recipe belongs in. Used to group recipes into different categories by the recipe book.
      Mappings:
      Namespace Name Mixin selector
      official d Lbth;d()Ljava/lang/String;
      intermediary method_8112 Lnet/minecraft/class_1860;method_8112()Ljava/lang/String;
      named getGroup Lnet/minecraft/recipe/Recipe;getGroup()Ljava/lang/String;
    • createIcon

      default ItemStack 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 with getGroup().
      Mappings:
      Namespace Name Mixin selector
      official h Lbth;h()Lbqp;
      intermediary method_17447 Lnet/minecraft/class_1860;method_17447()Lnet/minecraft/class_1799;
      named createIcon Lnet/minecraft/recipe/Recipe;createIcon()Lnet/minecraft/item/ItemStack;
    • getId

      Identifier getId()
      Mappings:
      Namespace Name Mixin selector
      official f Lbth;f()Lww;
      intermediary method_8114 Lnet/minecraft/class_1860;method_8114()Lnet/minecraft/class_2960;
      named getId Lnet/minecraft/recipe/Recipe;getId()Lnet/minecraft/util/Identifier;
    • getSerializer

      RecipeSerializer<?> getSerializer()
      Mappings:
      Namespace Name Mixin selector
      official R_ Lbth;R_()Lbtj;
      intermediary method_8119 Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;
      named getSerializer Lnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;
    • getType

      RecipeType<?> getType()
      Mappings:
      Namespace Name Mixin selector
      official g Lbth;g()Lbtk;
      intermediary method_17716 Lnet/minecraft/class_1860;method_17716()Lnet/minecraft/class_3956;
      named getType Lnet/minecraft/recipe/Recipe;getType()Lnet/minecraft/recipe/RecipeType;
    • isEmpty

      default boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      official i Lbth;i()Z
      intermediary method_31584 Lnet/minecraft/class_1860;method_31584()Z
      named isEmpty Lnet/minecraft/recipe/Recipe;isEmpty()Z