import * as mc from "@minecraft/server";
import * as utils from "../utils/index";
export function chickenAbility(player) {
    utils.mclog(`chicken`);
    mc.world.playSound('mob.chicken.hurt', player.location);
    utils.runCommand('particle ldz:chicken_ability ~ ~ ~', player);
    if (player.hasTag('onGround')) {
        player.addEffect('slow_falling', 100, { showParticles: false });
    }
    else {
        utils.waitForLoopEvent(10, () => {
            player.addEffect('slow_falling', 20, { showParticles: false });
            return player.hasTag('onGround');
        });
    }
}
