13 lines
647 B
TypeScript
13 lines
647 B
TypeScript
import type {Bot} from '@wp2508/mineflayer';
|
|
import type {BaseFunction} from '../../../types/bot/function/function.ts';
|
|
import {block_arguments, run_block_operation, type NearestArgs} from './shared.ts';
|
|
|
|
export class init implements BaseFunction<NearestArgs> {
|
|
readonly name = 'use_nearest_block';
|
|
readonly i18n = {lang: 'zh-CN', name: '使用最近方块', description: '右键使用范围内最近的匹配方块指定面,不自动移动或装备'};
|
|
readonly args = block_arguments('nearest');
|
|
async run(bot: Bot, args: NearestArgs): Promise<boolean> {
|
|
return run_block_operation(bot, args, 'nearest', 'use');
|
|
}
|
|
}
|