#ifndef MBLOCK_PLACER_HPP_
#define MBLOCK_PLACER_HPP_

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

class MBlockPlacer :
    public Machine,
    public IElectricMachine,
    public IBeltMachine,
    public IWorldActor
{
private:
    Side getPlacingSide();

public:
    static constexpr int energyPerItem = 10;

    MBlockPlacer(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 Side getSideFacing2D() override;
    virtual bool isUsingItemDirectly() override;
};

#endif