类 CookingRecipe<T extends CookingRecipe>
- 类型参数:
T- 配方类型
- 直接已知子类:
BlastingRecipe,CampfireRecipe,FurnaceRecipe,SmokingRecipe
-
构造器概要
构造器构造器说明CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) 创建一个烹饪配方来制作指定的物品堆。CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) 创建一个烹饪配方来制作指定的物品堆。 -
方法概要
修饰符和类型方法说明获取此配方在配方书中出现的类别。int获取此配方的烹饪时间(以刻为单位)。float获取此配方提供的经验值。getGroup()获取此配方的分组。getInput()获取输入材料。获取输入选项。getKey()返回用于此对象的命名空间标识符.获取此配方的结果。voidsetCategory(@NotNull CookingBookCategory category) 设置此配方在配方书中出现的类别。voidsetCookingTime(int cookingTime) 设置此配方的烹饪时间(以刻为单位)。voidsetExperience(float experience) 设置此配方提供的经验值。void设置此配方的分组。设置此烹饪配方的输入。setInputChoice(@NotNull RecipeChoice input) 设置此烹饪配方的输入。
-
构造器详细资料
-
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
获取输入材料。原文: Get the input material.
- 返回:
- 输入材料。
-
setInputChoice
设置此烹饪配方的输入。原文: Sets the input of this cooking recipe.
- 参数:
input- 输入选项。- 返回:
- 更改后的配方,以便你可以链式调用。
-
getInputChoice
获取输入选项。原文: Get the input choice.
- 返回:
- 输入选项。
-
getResult
获取此配方的结果。原文: Get the result of this 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
从接口复制的说明:Keyed返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getGroup
获取此配方的分组。具有相同分组的配方在客户端显示时可能会被分组在一起。原文: Get the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
- 返回:
- 配方分组。空字符串表示没有分组。不能为 null。
-
setGroup
设置此配方的分组。具有相同分组的配方在客户端显示时可能会被分组在一起。原文: Set the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
- 参数:
group- 配方分组。空字符串表示没有分组。不能为 null。
-
getCategory
获取此配方在配方书中出现的类别。 如果未设置,则默认为CookingBookCategory.MISC。原文: Gets the category which this recipe will appear in the recipe book under. Defaults to
CookingBookCategory.MISCif not set.- 返回:
- 配方书类别
-
setCategory
设置此配方在配方书中出现的类别。 如果未设置,则默认为CookingBookCategory.MISC。原文: Sets the category which this recipe will appear in the recipe book under. Defaults to
CookingBookCategory.MISCif not set.- 参数:
category- 配方书类别
-