chore: initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import type {Bot} from '@wp2508/mineflayer';
|
||||
import type {BaseFunction} from '../../../types/bot/function/function.ts';
|
||||
import {entity_arguments, run_entity_operation, type NearestItemArgs} from './shared.ts';
|
||||
|
||||
export class init implements BaseFunction<NearestItemArgs> {
|
||||
readonly name = 'use_item_on_nearest_entity';
|
||||
readonly i18n = {lang: 'zh-CN', name: '对最近实体使用物品', description: '对指定距离内名称匹配的最近实体使用指定手的物品,可选瞄准'};
|
||||
readonly args = entity_arguments(true, true);
|
||||
async run(bot: Bot, args: NearestItemArgs): Promise<boolean> {
|
||||
return run_entity_operation(bot, args, true, 'item', this.name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user