#include <SmeltingRule/BasicSmeltingRule/BasicSmeltingRule.hpp>
#include <Log/Log.hpp>

BasicSmeltingRule::BasicSmeltingRule(ItemStack input, ItemStack output) :
    m_input(input),
    m_output(output)
{
    if (input.getStackSize() != 1)
    {
        crash("BasicSmeltingRule created with an input stack bigger than 1! Currently unsupported!");
    }
}

bool BasicSmeltingRule::canSmelt(ItemStack &stack)
{
    return m_input.canMergeFrom(stack);
}

ItemStack BasicSmeltingRule::getSmeltingResult(ItemStack &input)
{
    return m_output;
}