java.lang.Object
me.wolfyscript.customcrafting.utils.recipe_item.target.ResultTarget
Direct Known Subclasses:
FixedResultTarget, NoneResultTarget, SlotResultTarget

public class ResultTarget extends Object
  • Constructor Details

    • ResultTarget

      protected ResultTarget()
    • ResultTarget

      protected ResultTarget(ResultTarget target)
  • 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 customItemResult, org.bukkit.inventory.ItemStack result)
      Merges the nbt of recipes onto the resulting ItemStack using the specified MergeOptions
      Parameters:
      recipeData - The RecipeData, 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!
      customItemResult - The CustomItem of the crafted item.
      result - The actual manipulable result ItemStack. Previous adapters might have already manipulated this item!
      Returns:
      The final manipulated resulting ItemStack.
    • addOption

      public ResultTarget addOption(MergeOption option)
      Adds a MergeOption to the Target.
      Parameters:
      option - The MergeOption to add.
      Returns:
      The ResultTarget for chaining this method.