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.
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 TypeMethodDescriptionorg.bukkit.inventory.ItemStackcreateOutput(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 craftedinputItems- The actual input ItemStacks (with all their metadata)- Returns:
- The crafted output item with proper metadata
-