#include <Item/StatelessItem/StatelessItem.hpp>

StatelessItem::StatelessItem(std::string name, std::string displayName) :
    Item(name),
    m_displayName(displayName)
{}

void StatelessItem::serializeState(std::vector<uint8_t> &outBytes, const ItemStack &stack)
{
    outBytes.push_back(0);
}

size_t StatelessItem::deserializeState(const uint8_t *data, size_t size, ItemStack &stack)
{
    return 1;
}

void StatelessItem::copyState(ItemStack &dest, const ItemStack &src)
{
    // NOP
}

void StatelessItem::destroyState(void *state)
{
    // NOP
}

std::string StatelessItem::getDisplayName(const ItemStack &stack)
{
    return m_displayName;
}

bool StatelessItem::isStateEqual(const ItemStack &a, const ItemStack &b)
{
    return true;
}