const FryingPan = {
    onHitEntity(event) {
        const { hitEntity } = event;

        // Random volume and pitch between 0.8 and 1.2
        let randomVolume = (Math.random() * 0.4 + 0.8).toFixed(2);
        let randomPitch = (Math.random() * 0.4 + 0.8).toFixed(2) - 0.1;

        hitEntity.runCommandAsync(`playsound lv_zo.pan.hit @a ~~~ ${randomVolume} ${randomPitch}`);
    }
};

export default FryingPan;
