#include <ItemFilter/ItemFilterByStack/ItemFilterByStack.hpp>

ItemFilterByStack::ItemFilterByStack(std::vector<ItemStack> refStacks) : refStacks(refStacks) {}

bool ItemFilterByStack::matches(ItemStack &stack)
{
    for (ItemStack &refStack : refStacks)
    {
        if (refStack.canMergeFrom(stack))
        {
            return true;
        }
    }

    return false;
}