Class SmithingRecipe

java.lang.Object
org.bukkit.inventory.SmithingRecipe
All Implemented Interfaces:
Recipe, Keyed
Direct Known Subclasses:
SmithingTransformRecipe, SmithingTrimRecipe

public class SmithingRecipe extends Object implements Recipe, Keyed
Represents a smithing recipe.
  • Constructor Details

    • SmithingRecipe

      @Deprecated public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition)
      Deprecated.
      as of Minecraft 1.20, smithing recipes are now separated into two distinct recipe types, SmithingTransformRecipe and SmithingTrimRecipe. This class now acts as a base class to these two classes and will do nothing when added to the server.
      Create a smithing recipe to produce the specified result ItemStack.
      Parameters:
      key - The unique recipe key
      result - The item you want the recipe to create.
      base - The base ingredient
      addition - The addition ingredient
  • Method Details

    • getBase

      @NotNull public RecipeChoice getBase()
      Get the base recipe item.
      Returns:
      base choice
    • getAddition

      @NotNull public RecipeChoice getAddition()
      Get the addition recipe item.
      Returns:
      addition choice
    • getResult

      @NotNull public ItemStack getResult()
      Description copied from interface: Recipe
      Get the result of this recipe.
      Specified by:
      getResult in interface Recipe
      Returns:
      The result stack
    • getKey

      @NotNull public NamespacedKey getKey()
      Description copied from interface: Keyed
      Return the namespaced identifier for this object.
      Specified by:
      getKey in interface Keyed
      Returns:
      this object's key