
export function onUseOn(event) {
    const block = event.source.getBlockFromViewDirection({ maxDistance: 8 });

    if (block) {
        if (block.block.above().isAir || block.block.above().isLiquid){
            block.block.above().setType(`diamond_block`)
            const equippable = event.source.getComponent("equippable");
            const EmptyBucket = new ItemStack('air', 0);
            equippable.setEquipment('Mainhand', EmptyBucket);
        }
    }
}

const boss_trophy = {
    onUseOn: onUseOn,
};

export default boss_trophy;
