Class TransmuteRecipe

java.lang.Object
org.bukkit.inventory.CraftingRecipe
org.bukkit.inventory.TransmuteRecipe
All Implemented Interfaces:
ComplexRecipe, Recipe, Keyed

public class TransmuteRecipe extends CraftingRecipe implements ComplexRecipe
Represents a recipe which will change the type of the input material when combined with an additional material, but preserve all custom data. Only the item type of the result stack will be used.
Used for dyeing shulker boxes in Vanilla.
  • Constructor Details

    • TransmuteRecipe

      public TransmuteRecipe(@NotNull NamespacedKey key, @NotNull Material result, @NotNull RecipeChoice input, @NotNull RecipeChoice material)
      Create a transmute recipe to produce a result of the specified type.
      Parameters:
      key - the unique recipe key
      result - the transmuted result material
      input - the input ingredient
      material - the additional ingredient
  • Method Details

    • getInput

      @NotNull public RecipeChoice getInput()
      Gets the input material, which will be transmuted.
      Returns:
      the input from transmutation
    • getMaterial

      @NotNull public RecipeChoice getMaterial()
      Gets the additional material required to cause the transmutation.
      Returns:
      the ingredient material