类 ShapedRecipe
java.lang.Object
org.bukkit.inventory.ShapedRecipe
Represents a shaped (ie normal) crafting recipe.
-
构造器概要
构造器说明ShapedRecipe
(ItemStack result) 已过时。ShapedRecipe
(NamespacedKey key, ItemStack result) Create a shaped recipe to craft the specified ItemStack. -
方法概要
修饰符和类型方法说明Get a copy of the ingredients map.getKey()
Return the namespaced identifier for this object.Get the result.String[]
getShape()
Get the shape.setIngredient
(char key, Material ingredient) Sets the material that a character in the recipe shape refers to.setIngredient
(char key, MaterialData ingredient) Sets the material that a character in the recipe shape refers to.setIngredient
(char key, Material ingredient, int raw) 已过时。Magic valueSet the shape of this recipe to the specified rows.
-
构造器详细资料
-
ShapedRecipe
已过时。 -
ShapedRecipe
Create a shaped recipe to craft the specified ItemStack. The constructor merely determines the result and type; to set the actual recipe, you'll need to call the appropriate methods.- 参数:
key
- the unique recipe keyresult
- The item you want the recipe to create.- 另请参阅:
-
-
方法详细资料
-
shape
Set the shape of this recipe to the specified rows. Each character represents a different ingredient; exactly what each character represents is set separately. The first row supplied corresponds with the upper most part of the recipe on the workbench e.g. if all three rows are supplies the first string represents the top row on the workbench.- 参数:
shape
- The rows of the recipe (up to 3 rows).- 返回:
- The changed recipe, so you can chain calls.
-
setIngredient
Sets the material that a character in the recipe shape refers to.- 参数:
key
- The character that represents the ingredient in the shape.ingredient
- The ingredient.- 返回:
- The changed recipe, so you can chain calls.
-
setIngredient
Sets the material that a character in the recipe shape refers to.- 参数:
key
- The character that represents the ingredient in the shape.ingredient
- The ingredient.- 返回:
- The changed recipe, so you can chain calls.
-
setIngredient
已过时。Magic valueSets the material that a character in the recipe shape refers to.- 参数:
key
- The character that represents the ingredient in the shape.ingredient
- The ingredient.raw
- The raw material data as an integer.- 返回:
- The changed recipe, so you can chain calls.
-
getIngredientMap
Get a copy of the ingredients map.- 返回:
- The mapping of character to ingredients.
-
getShape
Get the shape.- 返回:
- The recipe's shape.
-
getResult
Get the result. -
getKey
从接口复制的说明:Keyed
Return the namespaced identifier for this object.
-