#ifndef SLAB_HPP_
#define SLAB_HPP_

#include <Block/SpriteBlock/SpriteBlock.hpp>

class Slab : public SpriteBlock
{
private:
    SpriteBlock &base;

    static std::vector<Sprite> makeSprites(SpriteBlock &base);

    // The meta byte for slabs works like this:
    // Values 0-5 mean "this slab fills the side of this number".
    // Value 6 (metaFull) means the block is full.
    static constexpr uint8_t metaFull = 6;

public:
    Slab(std::string name, SpriteBlock &base);

    virtual bool canManuallyDig() override;
    virtual void onInteract(LocalWorld &world, Player &player, glm::ivec3 pos, Side side, const RGBABytes &collisionKey) override;
    virtual bool canPlace(LocalWorld &world, IWorldActor &actor, glm::ivec3 pos, Side side, uint8_t &meta) override;
    virtual void getHarvestedStacks(LocalWorld &world, glm::ivec3 pos, std::vector<ItemStack> &stacks) override;
    virtual void onDesignerInitializing(BlockSpriteDesigner &designer, ScriptEngine &engine) override;
};

#endif