Skip to content
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

make toss more efficient #129

Closed
rom1504 opened this issue Feb 9, 2013 · 7 comments
Closed

make toss more efficient #129

rom1504 opened this issue Feb 9, 2013 · 7 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Feb 9, 2013

currently it's tossing item one by one, what would be more efficient is to cut the amount requested into stacks then using tossStack.
For an amount n you need n=q*64+r you need q 64-items stacks and one stack of r items.
It would take a lot less time than currently (it can take something like 10 seconds to toss 32 items)

@andrewrk
Copy link
Member

andrewrk commented Feb 9, 2013

I agree it could be better, but I don't think it's worth the code complexity. The inventory code is already complicated enough; in order to solve this we might introduce more bugs or make it harder to stay up to date with the protocol.

@andrewrk andrewrk closed this as completed Feb 9, 2013
@rom1504
Copy link
Member Author

rom1504 commented Feb 9, 2013

Ok, I guess I'll try and do this in my bot.

@andrewrk
Copy link
Member

andrewrk commented Feb 9, 2013

I guess I can leave the issue open since it's still an issue.

@nevercast
Copy link
Contributor

Originally closed for reference to rom1504/rbot#15
I failed to notice it wasn't an issue on this repo.

Reopened. Added to 1.7 Milestone.

@nevercast nevercast added this to the Stable 1.7 milestone Apr 21, 2014
@rom1504 rom1504 modified the milestone: 1.1.0 Mar 31, 2015
@rom1504
Copy link
Member Author

rom1504 commented Apr 11, 2015

Fixing this issue consist of fixing the bot.transfer (https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/inventory.js#L115) function.
That would also make chest.deposit faster (it uses bot.transfer)

An idea would be not waiting after each click.

@rom1504
Copy link
Member Author

rom1504 commented Apr 15, 2015

see http://pastebin.com/tCjCbf4z (by Corgano)

rom1504 added a commit that referenced this issue Apr 16, 2015
…vement (chest for example) by left clicking when possible instead of doing only right clicks see #129, thanks @Corgano
@rom1504
Copy link
Member Author

rom1504 commented Apr 16, 2015

244fc7b fixes that issue.

@rom1504 rom1504 closed this as completed Apr 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants