类 ShapelessRecipe
-
构造器概要
构造器构造器说明ShapelessRecipe(@NotNull ItemStack result) 已过时。ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) 创建一个合成指定物品的无序配方。 -
方法概要
修饰符和类型方法说明addIngredient(int count, @NotNull Material ingredient) 添加多个指定成分。addIngredient(int count, @NotNull MaterialData ingredient) 添加多个指定成分。addIngredient(int count, @NotNull Material ingredient, int rawdata) 已过时。魔法值。addIngredient(@NotNull RecipeChoice ingredient) addIngredient(@NotNull Material ingredient) 添加指定的成分。addIngredient(@NotNull MaterialData ingredient) 添加指定的成分。addIngredient(@NotNull Material ingredient, int rawdata) 已过时。魔法值。获取此配方使用的成分列表。removeIngredient(int count, @NotNull Material ingredient) 从列表中移除多个成分实例。removeIngredient(int count, @NotNull MaterialData ingredient) 从列表中移除多个成分实例。removeIngredient(int count, @NotNull Material ingredient, int rawdata) 已过时。魔法值。removeIngredient(@NotNull RecipeChoice ingredient) 从列表中移除一个成分。removeIngredient(@NotNull Material ingredient) 从列表中移除一个成分。removeIngredient(@NotNull MaterialData ingredient) 从列表中移除一个成分。removeIngredient(@NotNull Material ingredient, int rawdata) 已过时。魔法值。从类继承的方法 org.bukkit.inventory.CraftingRecipe
checkResult, getCategory, getGroup, getKey, getResult, setCategory, setGroup
-
构造器详细资料
-
ShapelessRecipe
已过时。 -
ShapelessRecipe
创建一个合成指定物品的无序配方。构造函数仅决定结果和类型;要设置实际配方,你需要调用适当的方法。- 参数:
key- 配方的唯一键。result- 你希望配方创建的物品。- 抛出:
IllegalArgumentException- 如果result是空物品(AIR)。- 另请参阅:
-
addIngredient(Material)addIngredient(MaterialData)addIngredient(Material,int)addIngredient(int,Material)addIngredient(int,MaterialData)原文: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.
-
-
方法详细资料
-
addIngredient
添加指定的成分。- 参数:
ingredient- 要添加的成分。- 返回:
- 修改后的配方,以便链式调用。
原文:Adds the specified ingredient.
-
addIngredient
添加指定的成分。- 参数:
ingredient- 要添加的成分。- 返回:
- 修改后的配方,以便链式调用。
原文:Adds the specified ingredient.
-
addIngredient
@Deprecated(since="1.6.2") @NotNull public @NotNull ShapelessRecipe addIngredient(@NotNull @NotNull Material ingredient, int rawdata) 已过时。魔法值。原文:Adds the specified ingredient.
添加指定的成分。- 参数:
ingredient- 要添加的成分。rawdata- 数据值,或 -1 表示允许任何数据值。- 返回:
- 修改后的配方,以便链式调用。
-
addIngredient
@NotNull public @NotNull ShapelessRecipe addIngredient(int count, @NotNull @NotNull MaterialData ingredient) 添加多个指定成分。- 参数:
count- 要添加的数量(不能超过9个!)。ingredient- 要添加的成分。- 返回:
- 修改后的配方,以便链式调用。
原文:Adds multiples of the specified ingredient.
-
addIngredient
@NotNull public @NotNull ShapelessRecipe addIngredient(int count, @NotNull @NotNull Material ingredient) 添加多个指定成分。- 参数:
count- 要添加的数量(不能超过9个!)。ingredient- 要添加的成分。- 返回:
- 修改后的配方,以便链式调用。
原文:Adds multiples of the specified ingredient.
-
addIngredient
@Deprecated(since="1.6.2") @NotNull public @NotNull ShapelessRecipe addIngredient(int count, @NotNull @NotNull Material ingredient, int rawdata) 已过时。魔法值。原文:Adds multiples of the specified ingredient.
添加多个指定成分。- 参数:
count- 要添加的数量(不能超过9个!)。ingredient- 要添加的成分。rawdata- 数据值,或 -1 表示允许任何数据值。- 返回:
- 修改后的配方,以便链式调用。
-
addIngredient
-
removeIngredient
@NotNull public @NotNull ShapelessRecipe removeIngredient(@NotNull @NotNull RecipeChoice ingredient) 从列表中移除一个成分。- 参数:
ingredient- 要移除的成分。- 返回:
- 修改后的配方。
原文:Removes an ingredient from the list.
-
removeIngredient
从列表中移除一个成分。如果该成分出现多次,只移除其中一个实例。仅移除数据值为 0 的精确匹配项。- 参数:
ingredient- 要移除的成分。- 返回:
- 修改后的配方。
原文: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.
-
removeIngredient
@NotNull public @NotNull ShapelessRecipe removeIngredient(@NotNull @NotNull MaterialData ingredient) 从列表中移除一个成分。如果该成分出现多次,只移除其中一个实例。如果数据值为 -1,则只移除数据值为 -1 的成分。- 参数:
ingredient- 要移除的成分。- 返回:
- 修改后的配方。
原文: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.
-
removeIngredient
@NotNull public @NotNull ShapelessRecipe removeIngredient(int count, @NotNull @NotNull Material ingredient) 从列表中移除多个成分实例。如果实例数量少于指定数量,将全部移除。仅移除数据值为 0 的精确匹配项。- 参数:
count- 要移除的副本数量。ingredient- 要移除的成分。- 返回:
- 修改后的配方。
原文: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.
-
removeIngredient
@NotNull public @NotNull ShapelessRecipe removeIngredient(int count, @NotNull @NotNull MaterialData ingredient) 从列表中移除多个成分实例。如果实例数量少于指定数量,将全部移除。如果数据值为 -1,则只移除数据值为 -1 的成分。- 参数:
count- 要移除的副本数量。ingredient- 要移除的成分。- 返回:
- 修改后的配方。
原文: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.
-
removeIngredient
@Deprecated(since="1.6.2") @NotNull public @NotNull ShapelessRecipe removeIngredient(@NotNull @NotNull Material ingredient, int rawdata) 已过时。魔法值。原文: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.
从列表中移除一个成分。如果该成分出现多次,只移除其中一个实例。如果数据值为 -1,则只移除数据值为 -1 的成分。- 参数:
ingredient- 要移除的成分。rawdata- 数据值。- 返回:
- 修改后的配方。
-
removeIngredient
@Deprecated(since="1.6.2") @NotNull public @NotNull ShapelessRecipe removeIngredient(int count, @NotNull @NotNull Material ingredient, int rawdata) 已过时。魔法值。原文: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.
从列表中移除多个成分实例。如果实例数量少于指定数量,将全部移除。如果数据值为 -1,则只移除数据值为 -1 的成分。- 参数:
count- 要移除的副本数量。ingredient- 要移除的成分。rawdata- 数据值。- 返回:
- 修改后的配方。
-
getIngredientList
获取此配方使用的成分列表。- 返回:
- 输入列表。
原文:Get the list of ingredients used for this recipe.
-
getChoiceList
-