Class StonecuttingRecipe

java.lang.Object
org.bukkit.inventory.StonecuttingRecipe
All Implemented Interfaces:
net.kyori.adventure.key.Keyed, Recipe, Keyed

public class StonecuttingRecipe extends Object implements Recipe, Keyed
Represents a Stonecutting recipe.
Since:
1.14
  • Constructor Details

    • StonecuttingRecipe

      public StonecuttingRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull Material source)
      Create a Stonecutting recipe to craft the specified ItemStack.
      Parameters:
      key - The unique recipe key
      result - The item you want the recipe to create.
      source - The input material.
      Since:
      1.14
    • StonecuttingRecipe

      public StonecuttingRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull RecipeChoice input)
      Create a Stonecutting recipe to craft the specified ItemStack.
      Parameters:
      key - The unique recipe key
      result - The item you want the recipe to create.
      input - The input choices.
      Since:
      1.14
  • Method Details

    • setInput

      @NotNull public @NotNull StonecuttingRecipe setInput(@NotNull @NotNull Material input)
      Sets the input of this Stonecutting recipe.
      Parameters:
      input - The input material.
      Returns:
      The changed recipe, so you can chain calls.
      Since:
      1.14
    • getInput

      @Deprecated @NotNull public @NotNull ItemStack getInput()
      Deprecated.
      Use getInputChoice() instead for more complete data.
      Get the input material.
      Returns:
      The input material.
      Since:
      1.14
    • setInputChoice

      @NotNull public @NotNull StonecuttingRecipe setInputChoice(@NotNull @NotNull RecipeChoice input)
      Sets the input of this Stonecutting recipe.
      Parameters:
      input - The input choice.
      Returns:
      The changed recipe, so you can chain calls.
      Since:
      1.14
    • getInputChoice

      @NotNull public @NotNull RecipeChoice getInputChoice()
      Get the input choice.
      Returns:
      The input choice.
      Since:
      1.14
    • getResult

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

      @NotNull public @NotNull 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
      Since:
      1.14
    • getGroup

      @NotNull @Deprecated(since="26.1") public @NotNull String getGroup()
      Deprecated.
      no longer used for this recipe
      Get the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
      Returns:
      recipe group. An empty string denotes no group. May not be null.
      Since:
      1.14
    • setGroup

      @Deprecated(since="26.1") public void setGroup(@NotNull @NotNull String group)
      Deprecated.
      no longer used for this recipe
      Set the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
      Parameters:
      group - recipe group. An empty string denotes no group. May not be null.
      Since:
      1.14