Darthfett / helperbot

A mineflayer bot that helps you do things in minecraft.
57 stars 14 forks source link

strip: Error breaking block starts occuring every time the bot switches tools #40

Open Darthfett opened 11 years ago

Darthfett commented 11 years ago

After some time of strip mining, the bot will encounter an "Error breaking block". When I tell him to strip again, he will continue mining until he needs to switch tools again, and repeat the same error. This continues until the bot is restarted, at which point he will throw the tool he was attempting to equip for the next block on the ground.

I think this may be a bug with the inventory/equipping.

rom1504 commented 11 years ago

I had the same kind of bug in rbot, so it's probably a mineflayer inventory bug.

Darthfett commented 11 years ago

@rom1504: Yes, @superjoe30 has all but confirmed this, but he claims it's a bug with the minecraft protocol itself (not minecraft-protocol), as the client must send the server the metadata/damage of a tool, which will cause a rejected transaction if the metadata/damage is incorrect. IIRC from what @superjoe30 said, this occurs when there is a lot of lag, as the server does not immediately send the metadata updates.

The bug most likely exists in the Notchian minecraft client, but it isn't seen because of the time delay from opening the inventory and moving the cursor to select and move the tools (mineflayer is much faster at doing this).

rom1504 commented 11 years ago

Hopefully this will be fixed with minecraft 1.5. If it's not, it's still a bug that has to be handled even if it's a minecraft protocol bug : if it's needed mineflayer would have to use the inventory slower for exemple. Or maybe it's something that has to be handled in bots, I don't know. But it has to be handled somehow.