import { ItemStack } from '@minecraft/server';
import { FSItems, FSTags } from '../../constants.js';
import { spawnItemAtBlock } from '../../utils/utils.js';

class WoodShearsBreakHandler {
    spawnLoot(block) {
        spawnItemAtBlock(block, new ItemStack(block.typeId, 1));
    }
    isValidItem(item) {
        return item?.typeId === FSItems.WOODEN_SHEARS;
    }
    isValidBlock(block) {
        return FSTags.ALL_LEAVES.includes(block?.typeId);
    }
    damageItem(item, block) {
        return 1;
    }
}

export { WoodShearsBreakHandler };
