类 ShapelessRecipe
java.lang.Object
org.bukkit.inventory.ShapelessRecipe
Represents a shapeless recipe, where the arrangement of the ingredients on
the crafting grid does not matter.
-
构造器概要
构造器说明ShapelessRecipe
(ItemStack result) 已过时。ShapelessRecipe
(NamespacedKey key, ItemStack result) Create a shapeless recipe to craft the specified ItemStack. -
方法概要
修饰符和类型方法说明addIngredient
(int count, Material ingredient) Adds multiples of the specified ingredient.addIngredient
(int count, MaterialData ingredient) Adds multiples of the specified ingredient.addIngredient
(int count, Material ingredient, int rawdata) 已过时。Magic valueaddIngredient
(Material ingredient) Adds the specified ingredient.addIngredient
(MaterialData ingredient) Adds the specified ingredient.addIngredient
(Material ingredient, int rawdata) 已过时。Magic valueGet the list of ingredients used for this recipe.getKey()
Return the namespaced identifier for this object.Get the result of this recipe.removeIngredient
(int count, Material ingredient) Removes multiple instances of an ingredient from the list.removeIngredient
(int count, MaterialData ingredient) Removes multiple instances of an ingredient from the list.removeIngredient
(int count, Material ingredient, int rawdata) 已过时。Magic valueremoveIngredient
(Material ingredient) Removes an ingredient from the list.removeIngredient
(MaterialData ingredient) Removes an ingredient from the list.removeIngredient
(Material ingredient, int rawdata) 已过时。Magic value
-
构造器详细资料
-
ShapelessRecipe
已过时。 -
ShapelessRecipe
Create a shapeless 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.- 另请参阅:
-
-
方法详细资料
-
addIngredient
Adds the specified ingredient.- 参数:
ingredient
- The ingredient to add.- 返回:
- The changed recipe, so you can chain calls.
-
addIngredient
Adds the specified ingredient.- 参数:
ingredient
- The ingredient to add.- 返回:
- The changed recipe, so you can chain calls.
-
addIngredient
已过时。Magic valueAdds the specified ingredient.- 参数:
ingredient
- The ingredient to add.rawdata
- The data value, or -1 to allow any data value.- 返回:
- The changed recipe, so you can chain calls.
-
addIngredient
Adds multiples of the specified ingredient.- 参数:
count
- How many to add (can't be more than 9!)ingredient
- The ingredient to add.- 返回:
- The changed recipe, so you can chain calls.
-
addIngredient
Adds multiples of the specified ingredient.- 参数:
count
- How many to add (can't be more than 9!)ingredient
- The ingredient to add.- 返回:
- The changed recipe, so you can chain calls.
-
addIngredient
已过时。Magic valueAdds multiples of the specified ingredient.- 参数:
count
- How many to add (can't be more than 9!)ingredient
- The ingredient to add.rawdata
- The data value, or -1 to allow any data value.- 返回:
- The changed recipe, so you can chain calls.
-
removeIngredient
Removes an ingredient from the list. If the ingredient occurs multiple times, only one instance of it is removed. Only removes exact matches, with a data value of 0.- 参数:
ingredient
- The ingredient to remove- 返回:
- The changed recipe.
-
removeIngredient
Removes an ingredient from the list. If the ingredient occurs multiple times, only one instance of it is removed. If the data value is -1, only ingredients with a -1 data value will be removed.- 参数:
ingredient
- The ingredient to remove- 返回:
- The changed recipe.
-
removeIngredient
Removes multiple instances of an ingredient from the list. If there are less instances then specified, all will be removed. Only removes exact matches, with a data value of 0.- 参数:
count
- The number of copies to remove.ingredient
- The ingredient to remove- 返回:
- The changed recipe.
-
removeIngredient
Removes multiple instances of an ingredient from the list. If there are less instances then specified, all will be removed. If the data value is -1, only ingredients with a -1 data value will be removed.- 参数:
count
- The number of copies to remove.ingredient
- The ingredient to remove.- 返回:
- The changed recipe.
-
removeIngredient
已过时。Magic valueRemoves an ingredient from the list. If the ingredient occurs multiple times, only one instance of it is removed. If the data value is -1, only ingredients with a -1 data value will be removed.- 参数:
ingredient
- The ingredient to removerawdata
- The data value;- 返回:
- The changed recipe.
-
removeIngredient
已过时。Magic valueRemoves multiple instances of an ingredient from the list. If there are less instances then specified, all will be removed. If the data value is -1, only ingredients with a -1 data value will be removed.- 参数:
count
- The number of copies to remove.ingredient
- The ingredient to remove.rawdata
- The data value.- 返回:
- The changed recipe.
-
getResult
Get the result of this recipe. -
getIngredientList
Get the list of ingredients used for this recipe.- 返回:
- The input list
-
getKey
从接口复制的说明:Keyed
Return the namespaced identifier for this object.
-