类 TransmuteRecipe
java.lang.Object
org.bukkit.inventory.CraftingRecipe
org.bukkit.inventory.TransmuteRecipe
- 所有已实现的接口:
ComplexRecipe,Recipe,Keyed
代表一种配方,当与额外材料结合时会改变输入材料的类型,但保留所有自定义数据。仅使用结果物品栈的物品类型。
在原版中用于给潜影盒染色。
在原版中用于给潜影盒染色。
-
构造器概要
构造器构造器说明TransmuteRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) 创建一个转化配方以产生指定类型的结果。TransmuteRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice material, int minimumMaterialCount, int maximumMaterialCount, boolean addMaterialCountToResult) Create a transmute recipe to produce a result of the specified type.TransmuteRecipe(@NotNull NamespacedKey key, @NotNull Material result, @NotNull RecipeChoice input, @NotNull RecipeChoice material) 创建一个转化配方以产生指定类型的结果。 -
方法概要
修饰符和类型方法说明getInput()获取将被转化的输入材料。获取触发转化所需的额外材料。intGets the maximum amount of items matched by the material ingredient.intGets the minimum amount of items matched by the material ingredient.booleanGets whether the material ingredient count should be added to the result stack count after crafting.从类继承的方法 org.bukkit.inventory.CraftingRecipe
checkResult, getCategory, getGroup, getKey, getResult, setCategory, setGroup
-
构造器详细资料
-
TransmuteRecipe
public TransmuteRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull RecipeChoice input, @NotNull @NotNull RecipeChoice material, int minimumMaterialCount, int maximumMaterialCount, boolean addMaterialCountToResult) Create a transmute recipe to produce a result of the specified type.- 参数:
key- the unique recipe keyresult- the transmuted result iteminput- the input ingredientmaterial- the additional ingredientminimumMaterialCount- minimum count of the material, default 1, range [1, 8]maximumMaterialCount- maximum count of the material, default 1, range [1, 8]addMaterialCountToResult- whether the material count should be added to the result stack count, default false
-
TransmuteRecipe
public TransmuteRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull RecipeChoice input, @NotNull @NotNull RecipeChoice material) 创建一个转化配方以产生指定类型的结果。- 参数:
key- 配方的唯一键。result- 转化后的结果物品。input- 输入成分。material- 额外成分。原文:Create a transmute recipe to produce a result of the specified type.
-
TransmuteRecipe
public TransmuteRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull Material result, @NotNull @NotNull RecipeChoice input, @NotNull @NotNull RecipeChoice material) 创建一个转化配方以产生指定类型的结果。- 参数:
key- 配方的唯一键。result- 转化后的结果材料。input- 输入成分。material- 额外成分。原文:Create a transmute recipe to produce a result of the specified type.
-
-
方法详细资料
-
getInput
获取将被转化的输入材料。- 返回:
- 转化的输入。
原文:Gets the input material, which will be transmuted.
-
getMaterial
获取触发转化所需的额外材料。- 返回:
- 成分材料。
原文:Gets the additional material required to cause the transmutation.
-
getMinimumMaterialCount
public int getMinimumMaterialCount()Gets the minimum amount of items matched by the material ingredient.- 返回:
- minimum count of the material, default 1, range [1, 8]
-
getMaximumMaterialCount
public int getMaximumMaterialCount()Gets the maximum amount of items matched by the material ingredient.- 返回:
- maximum count of the material, default 1, range [1, 8]
-
isAddMaterialCountToResult
public boolean isAddMaterialCountToResult()Gets whether the material ingredient count should be added to the result stack count after crafting.- 返回:
- whether the material ingredient count should be added to the result stack count, default false
-