Add method for getting and setting remaining items in CrafterCraftEvent

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • CraftBukkit version 4440-Spigot-e5a64e7-43f66f6 (MC: 1.21.4) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
    • Yes

      The Crafter has the ability to "spit out" remaining items from a crafting recipe alongside the actually crafted item.
      A prime example of this is the recipe for Cake, where three empty Buckets remain, which the Crafter spits out alongside the crafted cake.

      With that said is there currently no easy way to obtain possible ItemStacks of remaining ingredient items, or set them within the CrafterCraftEvent.
      The only ItemStack obtainable is the crafting result, which itself is a single ItemStack instance that has no options available to retrieve any remaining ItemStacks from it being crafted.

      The only current aproach, if even doable at all by plugin devs, is to get the Crafter Block from the event, iterate through each crafting slot and check whether ItemStack#getType().getCraftingRemainingItem() returns a non-null ItemStack, which is simply tedious.

      If technically doable should the CrafterCraftEvent receive additional methods for optaining ItemStack instances - probably as a Collection<ItemStack>? - of remaining Item ingredients and also a setter method to set those for the Crafter to spit out.

            Assignee:
            Unassigned
            Reporter:
            Andre_601
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: