类 CookingRecipe<T extends CookingRecipe>

java.lang.Object
org.bukkit.inventory.CookingRecipe<T>
类型参数:
T - 配方类型
所有已实现的接口:
Recipe, Keyed
直接已知子类:
BlastingRecipe, CampfireRecipe, FurnaceRecipe, SmokingRecipe

public abstract class CookingRecipe<T extends CookingRecipe> extends Object implements Recipe, Keyed
代表一个烹饪配方。
  • 构造器详细资料

    • 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 - 唯一的配方键
      result - 你希望配方创建的物品。
      source - 输入材料。
      experience - 此配方提供的经验值
      cookingTime - 烹饪时间(以刻为单位)
    • 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 - 唯一的配方键
      result - 你希望配方创建的物品。
      input - 输入选项。
      experience - 此配方提供的经验值
      cookingTime - 烹饪时间(以刻为单位)
  • 方法详细资料

    • setInput

      设置此烹饪配方的输入。

      原文: Sets the input of this cooking recipe.

      参数:
      input - 输入材料。
      返回:
      更改后的配方,以便你可以链式调用。
    • getInput

      @NotNull public @NotNull ItemStack getInput()
      获取输入材料。

      原文: Get the input material.

      返回:
      输入材料。
    • setInputChoice

      @NotNull public T setInputChoice(@NotNull @NotNull RecipeChoice input)
      设置此烹饪配方的输入。

      原文: Sets the input of this cooking recipe.

      参数:
      input - 输入选项。
      返回:
      更改后的配方,以便你可以链式调用。
    • getInputChoice

      @NotNull public @NotNull RecipeChoice getInputChoice()
      获取输入选项。

      原文: Get the input choice.

      返回:
      输入选项。
    • getResult

      @NotNull public @NotNull ItemStack getResult()
      获取此配方的结果。

      原文: Get the result of this recipe.

      指定者:
      getResult 在接口中 Recipe
      返回:
      结果物品堆。
    • setExperience

      public void setExperience(float experience)
      设置此配方提供的经验值。

      原文: Sets the experience given by this recipe.

      参数:
      experience - 经验等级
    • getExperience

      public float getExperience()
      获取此配方提供的经验值。

      原文: Get the experience given by this recipe.

      返回:
      经验等级
    • setCookingTime

      public void setCookingTime(int cookingTime)
      设置此配方的烹饪时间(以刻为单位)。

      原文: Set the cooking time for this recipe in ticks.

      参数:
      cookingTime - 新的烹饪时间
    • getCookingTime

      public int getCookingTime()
      获取此配方的烹饪时间(以刻为单位)。

      原文: Get the cooking time for this recipe in ticks.

      返回:
      烹饪时间
    • 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.

      返回:
      配方分组。空字符串表示没有分组。不能为 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 - 配方分组。空字符串表示没有分组。不能为 null。
    • getCategory

      @NotNull public @NotNull CookingBookCategory getCategory()
      获取此配方在配方书中出现的类别。 如果未设置,则默认为 CookingBookCategory.MISC。

      原文: Gets the category which this recipe will appear in the recipe book under. Defaults to CookingBookCategory.MISC if not set.

      返回:
      配方书类别
    • setCategory

      public void setCategory(@NotNull @NotNull CookingBookCategory category)
      设置此配方在配方书中出现的类别。 如果未设置,则默认为 CookingBookCategory.MISC。

      原文: Sets the category which this recipe will appear in the recipe book under. Defaults to CookingBookCategory.MISC if not set.

      参数:
      category - 配方书类别