-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inventory is not updated after bot successfully get some resource #123
Comments
Recorder message: 114 ticks have elapsed Time: day Nearby blocks: sand, grass_block, spruce_leaves, dirt, spruce_log, fern, stone, grass Health: 20.0/20 Hunger: 20.0/20 Position: x=64.5, y=69.0, z=-97.3 Equipment: [None, None, None, None, None, None] Inventory (0/36): Empty Chests: None Task: Mine 1 wood log Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs. Critic Agent ai message // Find a wood log block // Mine the wood log block Execution error: No error Chat log: Explore success. Biome: Time: day Nearby blocks: sand, grass_block, spruce_leaves, dirt, spruce_log, fern, stone, grass Nearby entities (nearest to farthest): None Health: 20.0/20 Hunger: 20.0/20 Position: x=64.5, y=69.0, z=-97.3 Equipment: [None, None, None, None, None, None] Inventory (0/36): Empty Chests: None Task: Mine 1 wood log Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs. Critique: Mine 1 wood log and update your inventory with the collected log. Action Agent ai message Plan:
Code: async function mineWoodLogAndUpdateInventory(bot) {
const logNames = ["oak_log", "birch_log", "spruce_log", "jungle_log", "acacia_log", "dark_oak_log", "mangrove_log"];
// Find a wood log block
const logBlock = await exploreUntil(bot, new Vec3(1, 0, 1), 60, () => {
for (const logName of logNames) {
const log = bot.findBlock({
matching: mcData.blocksByName[logName].id,
maxDistance: 32
});
if (log) return log;
}
return null;
});
if (!logBlock) {
bot.chat("Could not find a wood log.");
return;
}
// Mine the wood log block
await mineBlock(bot, logBlock.name);
bot.chat("Wood log mined.");
// Update the inventory with the collected log
const logItem = mcData.itemsByName[logBlock.name];
bot.inventory.addItem(logItem.id, 1);
bot.chat("Inventory updated with the collected log.");
} Recorder message: 172 ticks have elapsed Action Agent human message // Find a wood log block // Mine the wood log block // Update the inventory with the collected log Execution error: Chat log: Explore success. Biome: Time: day Nearby blocks: sand, grass_block, spruce_leaves, dirt, spruce_log, fern, stone, grass Nearby entities (nearest to farthest): None Health: 20.0/20 Hunger: 20.0/20 Position: x=64.5, y=69.0, z=-97.3 Equipment: [None, None, None, None, None, None] Inventory (0/36): Empty Chests: None Task: Mine 1 wood log Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs. Critique: None
|
Actually, it seems there is just no Inventory in the Creative mode |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Before submitting an issue, make sure you read the FAQ.md
Briefly describe your issue
Inventory always remains empty even the bot has successfully obtained some resource
Please provide your python, nodejs, Minecraft, and Fabric versions here
Computer: apple M2
python: 3.9.17
nodejs: v18.17.1
minecraft: 1.9
fabric: fabric-loader-0.14.18-1.19
[If applicable] Please provide the Minefalyer and Minecraft logs, you can find the log under
logs
folderSo even with this error, the Minefalyer runs (tested with node index.js and it says Server started on port 3000)
However, the inventory never updates.
Example log:
The bot keeps failing on the first task, but you can see from the log that the bot has mined some log but the later inventory was not updated. I've tried this codebase on both ubuntu && macos, same issue.
I am using the local minecraft launcher.
[If applicable] Please provide the GPT conversations that are printed each round.
...
The text was updated successfully, but these errors were encountered: