#ifndef MBLOCK_BREAKER_HPP_
#define MBLOCK_BREAKER_HPP_

#include <Machine/Machine.hpp>
#include <Machine/IElectricMachine.hpp>
#include <Machine/IBeltMachine.hpp>
#include <World/IWorldActor.hpp>

class MBlockBreaker :
    public Machine,
    public IElectricMachine,
    public IBeltMachine
{
private:
    std::list<ItemStack> itemQueue;

    Side getBreakingSide();

public:
    static constexpr int energyPerBlock = 10;
    static constexpr int energyCapacity = 1000;

    MBlockBreaker(LocalWorld &world, glm::ivec3 pos);

    virtual void serializeState(std::vector<uint8_t> &outBytes) override;
    virtual void deserializeState(const uint8_t *data, size_t size) override;
    virtual bool canConnectElectricWire(Side side) override;
    virtual void onItemStackEntering(Side side, ItemStack &stack) override;
    virtual void update() override;
};

#endif