From 3e92b1e945a3accd779805847314bb430d9e6311 Mon Sep 17 00:00:00 2001 From: RainbowBird Date: Wed, 8 Jan 2025 23:26:46 +0800 Subject: [PATCH] chore: simplify --- services/minecraft/src/utils/mcdata.ts | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/services/minecraft/src/utils/mcdata.ts b/services/minecraft/src/utils/mcdata.ts index 60340e4c8..1ebc0906f 100644 --- a/services/minecraft/src/utils/mcdata.ts +++ b/services/minecraft/src/utils/mcdata.ts @@ -55,28 +55,6 @@ export const WOOL_COLORS: string[] = [ 'black', ] -export function initBot(username: string): Bot { - const bot = createBot({ - username, - - host: botConfig.host, - port: botConfig.port, - auth: 'offline', - - version: mc_version, - }) - bot.loadPlugin(pathfinder) - bot.loadPlugin(pvp) - bot.loadPlugin(collectblock) - bot.loadPlugin(autoEat) - bot.loadPlugin(armorManager) // auto equip armor - bot.once('resourcePack', () => { - bot.acceptResourcePack() - }) - - return bot -} - export function isHuntable(mob: { name?: string, metadata: any[] }): boolean { if (!mob || !mob.name) return false @@ -172,6 +150,7 @@ export function getItemCraftingRecipes(itemName: string): Record return null } + // todo: fix this const recipes: Record[] = [] for (const r of mcdata.recipes[itemId]) { const recipe: Record = {}