类 CraftingRecipe
java.lang.Object
org.bukkit.inventory.CraftingRecipe
- 直接已知子类:
ShapedRecipe
,ShapelessRecipe
,TransmuteRecipe
Represents a shaped or shapeless crafting recipe.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明checkResult
(@NotNull ItemStack result) Checks an ItemStack to be used in constructors related to CraftingRecipe is not empty.Gets the category which this recipe will appear in the recipe book under.getGroup()
Get the group of this recipe.getKey()
返回用于此对象的命名空间标识符.Get the result of this recipe.void
setCategory
(@NotNull CraftingBookCategory category) Sets the category which this recipe will appear in the recipe book under.void
Set the group of this recipe.
-
构造器详细资料
-
CraftingRecipe
-
-
方法详细资料
-
getKey
从接口复制的说明:Keyed
返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getResult
Get the result of this recipe. -
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
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
Gets the category which this recipe will appear in the recipe book under.
Defaults toCraftingBookCategory.MISC
if not set.- 返回:
- recipe book category
-
setCategory
Sets the category which this recipe will appear in the recipe book under.
Defaults toCraftingBookCategory.MISC
if not set.- 参数:
category
- recipe book category
-
checkResult
@Internal @NotNull protected static @NotNull ItemStack checkResult(@NotNull @NotNull ItemStack result) Checks an ItemStack to be used in constructors related to CraftingRecipe is not empty.- 参数:
result
- an ItemStack- 返回:
- the same result ItemStack
- 抛出:
IllegalArgumentException
- if theresult
is an empty item (AIR)
-