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