Skip to content

Use worker_threads #3

@emberglazee

Description

@emberglazee

Is your feature request related to a problem? Please describe.

If multiple bots are created with one node process, anything related to mineflayer-pathfinder becomes wacky as hell (only one bot actually moving at the time about 10 blocks then eventually timing out or being stuck in one place)

Describe the solution you'd like

Spawn a worker thread for each swarm bot. That will ensure less lag and actually working pathfinder. If needed to send things in between the worker threads, use websocket or worker_threads' MessagePort?

Describe alternatives you've considered

Not really related to mineflayer-swarm itself, but I've tried doing that on my own and always failed terribly.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions