Class DyeRecipe

All Implemented Interfaces:
ComplexRecipe, Recipe, Keyed

@Experimental public class DyeRecipe extends CraftingRecipe implements ComplexRecipe
Represents a recipe which will mix the dye color from the input with the dye color from the dye material into the result but with the mixed dye color.
  • Constructor Details

    • DyeRecipe

      public DyeRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice material)
      Create a dye recipe to produce a result of the specified type.
      Parameters:
      key - the unique recipe key
      result - the dyed result item
      input - the input ingredient
      material - the additional dye ingredient
    • DyeRecipe

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

    • getInput

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

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