UNPKG

mineflayer-crafting-util

Version:
21 lines (20 loc) 1.25 kB
import type { Bot, BotOptions } from 'mineflayer'; import { type CraftPlanOptions } from './actual-crafting'; import type { Item, CraftOptions, CraftingPlan } from './types'; import { type Recipe as PRecipe } from 'prismarine-recipe'; type CraftingTable = NonNullable<Parameters<Bot['craft']>[2]>; declare module 'mineflayer' { interface Bot { planCraft: (wantedItem: Item, options?: CraftOptions) => CraftingPlan; planCraftInventory: (wantedItem: Item) => CraftingPlan; craftPlan: (plan: CraftingPlan, craftingTable: CraftingTable, options?: CraftPlanOptions) => Promise<CraftingPlan>; craftItem: (itemId: number, count: number, craftingTable: CraftingTable, options?: CraftOptions, craftOptions?: CraftPlanOptions) => Promise<CraftingPlan>; } } declare function injectCraftingFromRecipeInstance(bot: Bot, Recipe: typeof PRecipe): void; declare const createPlugin: (recipe?: typeof import("prismarine-recipe").Recipe) => (bot: Bot, botoptions: BotOptions) => Promise<void>; export default createPlugin; export { buildStatic } from './craft-injection'; export { createPlugin as plugin }; export { injectCraftingFromRecipeInstance }; export { craftItem, craftPlan, setupActualCrafting } from './actual-crafting';