#include <FuelRule/LogFuelRule/LogFuelRule.hpp>
#include <Block/Block.hpp>
#include <Item/StatefulItem/BlockItem/BlockItem.hpp>

bool LogFuelRule::isValidFuel(ItemStack &stack)
{
    BlockItem *blockItem = stack.getItemAs<BlockItem>();
    if (blockItem == nullptr)
    {
        return false;
    }

    Block &block = blockItem->getBlockInStack(stack);
    return block.isSuffixed("Log");
}

uint32_t LogFuelRule::getFuelAmount(ItemStack &stack)
{
    return 80;
}