13 lines
669 B
TypeScript
13 lines
669 B
TypeScript
import type {Bot} from '@wp2508/mineflayer';
|
|
import type {BaseFunction} from '../../../types/bot/function/function.ts';
|
|
import {block_arguments, run_block_operation, type CursorArgs} from './shared.ts';
|
|
|
|
export class init implements BaseFunction<CursorArgs> {
|
|
readonly name = 'place_cursor_block';
|
|
readonly i18n = {lang: 'zh-CN', name: '向光标方块放置', description: '使用主手物品向光标命中面及交点放置,默认保留视角,不自动移动或装备'};
|
|
readonly args = block_arguments('cursor');
|
|
async run(bot: Bot, args: CursorArgs): Promise<boolean> {
|
|
return run_block_operation(bot, args, 'cursor', 'place');
|
|
}
|
|
}
|