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

Improve the behaviors when found an error #96

Open
sefirosweb opened this issue Apr 5, 2021 · 0 comments
Open

Improve the behaviors when found an error #96

sefirosweb opened this issue Apr 5, 2021 · 0 comments

Comments

@sefirosweb
Copy link
Contributor

I think in the behaviors must have a 2 returns value,

One of "is finished" and another one about found any error,

For example:

https://github.com/PrismarineJS/mineflayer-statemachine/blob/d69786e1f0e36c22d30d0c8f58abb6fa4254c937/src/behaviors/behaviorInteractBlock.ts

In this case if the bot can't "see" block they stops all the bot,

I think need one return for "end of function" if when end of function all is okey, fine but if they found any error for do something (go mo re near of the block, or restart, anything, but no stop all)

What do you think? on my custom behaviors i implemented this for avoid errors, (example error on server transaction on change held block )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant