#include <Block/SpriteBlock/BasicBlock/Leaves/Leaves.hpp>
#include <ItemRegistry/ItemRegistry.hpp>
#include <World/LocalWorld/LocalWorld.hpp>

Leaves::Leaves(std::string name, std::string displayName, std::string texName) : BasicBlock(name, displayName, 15.0f, texName)
{
    digManually(Sound::leavesDigging);
    withFallingSound(Sound::fallingOnGrass);
    withBreakingSound(Sound::leavesBreaking);
    withFootstepSound(Sound::grassFootsteps1);
    withFootstepSound(Sound::grassFootsteps2);
    withFootstepSound(Sound::grassFootsteps3);
}

void Leaves::getHarvestedStacks(LocalWorld &world, glm::ivec3 pos, std::vector<ItemStack> &stacks)
{
    if (world.probably(25))
    {
        stacks.push_back(ItemStack(*itemRegistry.getItemByName("main:stick")));
    }
}