PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.95k stars 904 forks source link

Check whether rejected transactions are handled properly #279

Closed rom1504 closed 5 years ago

rom1504 commented 9 years ago

It's needed for https://github.com/demipixel/shotbow-servers/blob/master/extension.js : us.shotbow.net server uses slots in a window as button and when you click it the item isn't taken, and the transaction is rejected. Apparently mineflayer doesn't react to rejected transactions correctly since the server then doesn't send any other transaction packet (see http://wiki.vg/Protocol#Click_Window) Also see https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/inventory.js#L296

rom1504 commented 9 years ago

maybe the server doesn't send more than one rejected transaction in a row ?

rom1504 commented 9 years ago

apparently adding a setTimeout to call the callback if the server doesn't feel like sending a transaction packet does it (it seems to work for @demipixel )

roblabla commented 9 years ago

doesn't feel like sending a transaction packet

... wut ?

rom1504 commented 9 years ago

Yeah I hope there's a better explanation than that @roblabla ^^

rom1504 commented 9 years ago

test whether it works or not on vanilla.

Gjum commented 8 years ago

Having packet logs for comparison would be useful here.

rom1504 commented 5 years ago

this issue is too imprecise, closing