类 TransmuteRecipe

java.lang.Object
org.bukkit.inventory.CraftingRecipe
org.bukkit.inventory.TransmuteRecipe
所有已实现的接口:
ComplexRecipe, Recipe, Keyed

public class TransmuteRecipe extends CraftingRecipe implements ComplexRecipe
代表一种配方,当与额外材料结合时会改变输入材料的类型,但保留所有自定义数据。仅使用结果物品栈的物品类型。
在原版中用于给潜影盒染色。
  • 构造器详细资料

    • 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 key
      result - the transmuted result item
      input - the input ingredient
      material - the additional ingredient
      minimumMaterialCount - 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

      创建一个转化配方以产生指定类型的结果。
      参数:
      key - 配方的唯一键。
      result - 转化后的结果物品。
      input - 输入成分。
      material - 额外成分。

      原文:Create a transmute recipe to produce a result of the specified type.

    • TransmuteRecipe

      创建一个转化配方以产生指定类型的结果。
      参数:
      key - 配方的唯一键。
      result - 转化后的结果材料。
      input - 输入成分。
      material - 额外成分。

      原文:Create a transmute recipe to produce a result of the specified type.

  • 方法详细资料

    • getInput

      @NotNull public @NotNull RecipeChoice getInput()
      获取将被转化的输入材料。
      返回:
      转化的输入。

      原文:Gets the input material, which will be transmuted.

    • getMaterial

      @NotNull public @NotNull RecipeChoice 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