diff --git a/chat.js b/chat.js index e7a5e0c..a53a1bb 100644 --- a/chat.js +++ b/chat.js @@ -1,7 +1,5 @@ import { sendRequest } from './utils/gpt.js'; import { getHistory, addEvent } from './utils/history.js'; -import { getStats, getInventory, getBlocks, getNearbyPlayers, getNearbyEntities, getCraftable } from './utils/context.js'; -import { currentCode, executeCode, writeCode } from './act.js'; import { getCommand, getCommandDocs } from './utils/commands.js'; diff --git a/package.json b/package.json index 4f9767c..c54b628 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "type": "module", "dependencies": { + "minecraft-data": "^3.46.2", "mineflayer": "^4.14.0", "mineflayer-collectblock": "^1.4.1", "mineflayer-pathfinder": "^2.4.4", diff --git a/utils/commands.js b/utils/commands.js index 5167a8a..3dfe61c 100644 --- a/utils/commands.js +++ b/utils/commands.js @@ -1,4 +1,4 @@ -import { getStats, getInventory, getBlocks, getNearbyPlayers, getNearbyEntities, getCraftable } from './context.js'; +import { getStats, getInventory, getBlocks, getNearbyEntities, getCraftable } from './context.js'; import { currentCode, executeCode, writeCode } from '../act.js'; const pad = (str) => { @@ -38,7 +38,7 @@ const commandsList = [ name: "!entities", description: "Get the nearby players and entities.", perform: function (bot) { - return pad(getNearbyPlayers(bot) + '\n' + getNearbyEntities(bot)); + return pad(getNearbyEntities(bot)); } }, { diff --git a/utils/world.js b/utils/world.js index b6c474f..0b7129a 100644 --- a/utils/world.js +++ b/utils/world.js @@ -179,5 +179,5 @@ export function getNearbyBlockTypes(bot) { found.push(blocks[i].name); } } - return Array.from(blockNames); + return found; }