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