程序包 org.bukkit.inventory

# 类 CookingRecipe<T extends CookingRecipe>

java.lang.Object
org.bukkit.inventory.CookingRecipe<T>

类型参数:
  `T` - type of recipe

所有已实现的接口:
  `Recipe`, `Keyed`

直接已知子类:
  `BlastingRecipe`, `CampfireRecipe`, `FurnaceRecipe`, `SmokingRecipe`

public abstract class CookingRecipe<T extends CookingRecipe> extends Object implements Recipe, Keyed
Represents a cooking recipe.

- ## 构造器概要

  构造器
  构造器
  说明
  `CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
  Create a cooking recipe to craft the specified ItemStack.
  `CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)`
  Create a cooking recipe to craft the specified ItemStack.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull CookingBookCategory`
  `getCategory()`
  Gets the category which this recipe will appear in the recipe book under.
  `int`
  `getCookingTime()`
  Get the cooking time for this recipe in ticks.
  `float`
  `getExperience()`
  Get the experience given by this recipe.
  `@NotNull String`
  `getGroup()`
  Get the group of this recipe.
  `@NotNull ItemStack`
  `getInput()`
  Get the input material.
  `@NotNull RecipeChoice`
  `getInputChoice()`
  Get the input choice.
  `@NotNull NamespacedKey`
  `getKey()`
  返回用于此对象的命名空间标识符.
  `@NotNull ItemStack`
  `getResult()`
  Get the result of this recipe.
  `void`
  `setCategory(@NotNull CookingBookCategory category)`
  Sets the category which this recipe will appear in the recipe book under.
  `void`
  `setCookingTime(int cookingTime)`
  Set the cooking time for this recipe in ticks.
  `void`
  `setExperience(float experience)`
  Sets the experience given by this recipe.
  `void`
  `setGroup(@NotNull String group)`
  Set the group of this recipe.
  `@NotNull CookingRecipe`
  `setInput(@NotNull Material input)`
  Sets the input of this cooking recipe.
  `T`
  `setInputChoice(@NotNull RecipeChoice input)`
  Sets the input of this cooking recipe.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### CookingRecipe

    public CookingRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull Material source, float experience, int cookingTime)
    Create a cooking recipe to craft the specified ItemStack.
    参数:
      `key` - The unique recipe key
      `result` - The item you want the recipe to create.
      `source` - The input material.
      `experience` - The experience given by this recipe
      `cookingTime` - The cooking time (in ticks)

  - ### CookingRecipe

    public CookingRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull RecipeChoice input, float experience, int cookingTime)
    Create a cooking recipe to craft the specified ItemStack.
    参数:
      `key` - The unique recipe key
      `result` - The item you want the recipe to create.
      `input` - The input choices.
      `experience` - The experience given by this recipe
      `cookingTime` - The cooking time (in ticks)

- ## 方法详细资料

  - ### setInput

    @NotNull public @NotNull CookingRecipe setInput(@NotNull @NotNull Material input)
    Sets the input of this cooking recipe.
    参数:
      `input` - The input material.
    返回:
      The changed recipe, so you can chain calls.

  - ### getInput

    @NotNull public @NotNull ItemStack getInput()
    Get the input material.
    返回:
      The input material.

  - ### setInputChoice

    @NotNull public T setInputChoice(@NotNull @NotNull RecipeChoice input)
    Sets the input of this cooking recipe.
    参数:
      `input` - The input choice.
    返回:
      The changed recipe, so you can chain calls.

  - ### getInputChoice

    @NotNull public @NotNull RecipeChoice getInputChoice()
    Get the input choice.
    返回:
      The input choice.

  - ### getResult

    @NotNull public @NotNull ItemStack getResult()
    Get the result of this recipe.
    指定者:
      `getResult` 在接口中 `Recipe`
    返回:
      The resulting stack.

  - ### setExperience

    public void setExperience(float experience)
    Sets the experience given by this recipe.
    参数:
      `experience` - the experience level

  - ### getExperience

    public float getExperience()
    Get the experience given by this recipe.
    返回:
      experience level

  - ### setCookingTime

    public void setCookingTime(int cookingTime)
    Set the cooking time for this recipe in ticks.
    参数:
      `cookingTime` - new cooking time

  - ### getCookingTime

    public int getCookingTime()
    Get the cooking time for this recipe in ticks.
    返回:
      cooking time

  - ### getKey

    @NotNull public @NotNull NamespacedKey getKey()
    从接口复制的说明: `Keyed`
    返回用于此对象的命名空间标识符.

    原文:Return the namespaced identifier for this object.

    指定者:
      `getKey` 在接口中 `Keyed`
    返回:
      标识此对象的 key

  - ### getGroup

    @NotNull public @NotNull String getGroup()
    Get the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
    返回:
      recipe group. An empty string denotes no group. May not be null.

  - ### setGroup

    public void setGroup(@NotNull @NotNull String group)
    Set the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
    参数:
      `group` - recipe group. An empty string denotes no group. May not be null.

  - ### getCategory

    @NotNull public @NotNull CookingBookCategory getCategory()
    Gets the category which this recipe will appear in the recipe book under. Defaults to `CookingBookCategory.MISC` if not set.
    返回:
      recipe book category

  - ### setCategory

    public void setCategory(@NotNull @NotNull CookingBookCategory category)
    Sets the category which this recipe will appear in the recipe book under. Defaults to `CookingBookCategory.MISC` if not set.
    参数:
      `category` - recipe book category