Closed satyamedh closed 3 years ago
Possible duplicate of https://github.com/PrismarineJS/mineflayer/issues/1405
Update 2: Looks like the example bot for inventory.js is using a hardcoded ID value. https://github.com/PrismarineJS/mineflayer/blob/6941b61f809b6da6928a09e8841d4d815b8d148f/examples/inventory.js#L135
This is more likely the issue here if it's happening on vanilla. IDs are not static across versions.
58
should be replaced with require('minecraft-data')(bot.version).blocksByName.crafting_table.id
@TheDudeFromCI That fixed it! also now it says I can make a wooden pickaxe, turns over, clicks on crafting table and stays there forever, no errors.
@TheDudeFromCI is it slow crafting?
Yes, crafting can be a bit slow. It should finish after a few moments, though.
I left it overnight, did nothing @TheDudeFromCI
On Fri, Nov 20, 2020 at 5:11 AM TheDudeFromCI notifications@github.com wrote:
Yes, crafting can be a bit slow. It should finish after a few moments, though.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/issues/1461#issuecomment-730706025, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLN6PH6OG47YYD7IFSDNTDSQWUKVANCNFSM4T3NAJ2A .
"slow" in this context is 30-60 seconds at most. If it doesn't finish after 1 minute, it's usually broken.
It's very possible the inventory example is experiencing a regression bug.
@TheDudeFromCI So How can I fix it?
Looking through the code, I don't see any reason why it shouldn't work. You should open a seperate bug report for this @satyamedh
aight
Versions
Clear question
I am trying to get the bot to craft a wooden pickaxe for me, it said it cannot craft it. The function is a replica of the example(inventory.js). I did some debugging and found out that bot.findBlock always returns null. Even if the crafting table is right in front of the bot. I am a newbie :)
What did you try yet? Copy pasting the function again, checking syntax if it is correct etc
Did you try any method from the API? Did you try any example? Any error from those? inventory, pure inventory.js with no changes dosent either
Your current code
Please put here any custom code you tried yet.
Additional context
Add any other context about the problem here.