Files
node_server/bot/function/entity/attack_cursor_entity.ts
T
2026-10-22 17:07:08 +08:00

13 lines
647 B
TypeScript

import type {Bot} from '@wp2508/mineflayer';
import type {BaseFunction} from '../../../types/bot/function/function.ts';
import {entity_arguments, run_entity_operation, type CursorArgs} from './shared.ts';
export class init implements BaseFunction<CursorArgs> {
readonly name = 'attack_cursor_entity';
readonly i18n = {lang: 'zh-CN', name: '攻击光标实体', description: '攻击光标指向且在指定距离内的实体,不自动移动'};
readonly args = entity_arguments(false, false, true);
async run(bot: Bot, args: CursorArgs): Promise<boolean> {
return run_entity_operation(bot, args, false, 'attack');
}
}