Class EnchantedBookMergeAdapter
java.lang.Object
me.wolfyscript.customcrafting.utils.recipe_item.target.MergeAdapter
me.wolfyscript.customcrafting.utils.recipe_item.target.adapters.EnchantedBookMergeAdapter
- All Implemented Interfaces:
me.wolfyscript.utilities.util.Keyed
-
Field Summary
Fields inherited from class me.wolfyscript.customcrafting.utils.recipe_item.target.MergeAdapter
key, slots
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionclone()
org.bukkit.inventory.ItemStack
merge(RecipeData<?> recipeData, @Nullable org.bukkit.entity.Player player, @Nullable org.bukkit.block.Block block, me.wolfyscript.utilities.api.inventory.custom_items.CustomItem customResult, org.bukkit.inventory.ItemStack result)
Called when the data is merged inside of recipes like Furnace, Smithing Table, etc.Methods inherited from class me.wolfyscript.customcrafting.utils.recipe_item.target.MergeAdapter
getNamespacedKey, merge, mergeCrafting
-
Constructor Details
-
EnchantedBookMergeAdapter
public EnchantedBookMergeAdapter() -
EnchantedBookMergeAdapter
-
-
Method Details
-
merge
public org.bukkit.inventory.ItemStack merge(RecipeData<?> recipeData, @Nullable @Nullable org.bukkit.entity.Player player, @Nullable @Nullable org.bukkit.block.Block block, me.wolfyscript.utilities.api.inventory.custom_items.CustomItem customResult, org.bukkit.inventory.ItemStack result)Description copied from class:MergeAdapter
Called when the data is merged inside of recipes like Furnace, Smithing Table, etc.- Specified by:
merge
in classMergeAdapter
- Parameters:
recipeData
- TheRecipeData
, that contains all the data of the pre-crafted recipe, like ingredients and their slots, result, and the recipe itself.player
- The player that has crafted the item. Might be null! e.g. Furnaces, and other workstations without player interaction!block
- The block that has processed the recipe. Might be null! e.g. for the 2x2 player crafting grid!customResult
- TheCustomItem
of the crafted item.result
- The actual manipulable resultItemStack
. Previous adapters might have already manipulated this item!- Returns:
- The manipulated
ItemStack
that should be passed to the next adapter or set as the end result.
-
clone
- Specified by:
clone
in classMergeAdapter
-