Interface CustomOutputHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CustomOutputHandler
Functional interface for custom output creation in recipes. Addons can register handlers for specific recipe IDs to take control of output item creation, allowing them to preserve metadata from input items that would otherwise be lost. Example use case: Boiling grain wort needs to preserve the LiquidProfile from the input wort to the output boiled wort.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    createOutput(Recipe recipe, List<org.bukkit.inventory.ItemStack> inputItems)
    Create the output item for a recipe.
  • Method Details

    • createOutput

      org.bukkit.inventory.ItemStack createOutput(Recipe recipe, List<org.bukkit.inventory.ItemStack> inputItems)
      Create the output item for a recipe.
      Parameters:
      recipe - The recipe being crafted
      inputItems - The actual input ItemStacks (with all their metadata)
      Returns:
      The crafted output item with proper metadata