#ifndef POT_HPP_
#define POT_HPP_

#include <Block/SpriteBlock/SpriteBlock.hpp>
#include <Block/MachineBlockMixin.hpp>
#include <Machine/MPot/MPot.hpp>

class Pot : public SpriteBlock, public MachineBlockMixin<MPot>
{
private:
    /*
        #               Pot Meta Byte
        +-------+---+---+---+---+---+---+---+---+
        | Bit   | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
        +-------+---+---+---+---+---+---+---+---+
        | Field |   |   |   |   |   | F | tempr |
        +-------+---+---+---+---+---+---+---+---+

        tempr
            Indicates the temperature level.
        
        F
            If 1, it means there is fuel in the pot.
    */
    bool isIron;

    static std::vector<Sprite> makeSprites(bool isIron);

public:
    Pot(std::string name, bool isIron);

    virtual glm::vec3 getLightColor(uint8_t meta) override;
    virtual float getLightVariance(uint8_t meta) override;
    virtual glm::ivec3 getLightOffset(uint8_t meta) override;
    virtual void onInteract(LocalWorld &world, Player &player, glm::ivec3 pos, Side side, const RGBABytes &collisionKey) override;
    virtual void getHarvestedStacks(LocalWorld &world, glm::ivec3 pos, std::vector<ItemStack> &stacks) override;
    virtual bool canManuallyDig() override;
    virtual Sound& getBackgroundSound(uint8_t meta) override;
    virtual void getCollisionBoxes(World &world, glm::ivec3 pos, std::vector<BoundingBox<wfixed>> &boxes) override;
    virtual void getEffects(uint8_t meta, glm::vec3 offset, std::vector<std::shared_ptr<BlockEffect>> &effects) override;
};

#endif