import { MeleeAttack, mclog } from "../utils/index";
import { knockBackEntity } from "../local_utils";
export function initDonkeyWeapon() {
    new MeleeAttack({
        attackID: "ldz:donkey_weapon",
        damage: 5,
        range: 3,
        minAngle: -20,
        maxAngle: 20,
        piercing: true,
        subscribeToScriptEvent: true,
        hitCallbacks: [
            (player, hitEntity) => useDonkeyWeapon(player, hitEntity)
        ],
    });
}
function useDonkeyWeapon(player, hitEntity) {
    const knockedBackEntity = knockBackEntity(hitEntity, player.getViewDirection(), 5.0, 1.0);
    if (knockedBackEntity) {
        mclog(`${player.nameTag} used donkey_weapon`);
    }
}
