Description
For example there would be a mineflayer-windows and a mineflayer-physics.
These things would get packets and do actions on a prismarine-world.
Benefit of extracting them out may be to make it easier to use them in a https://github.com/PrismarineJS/prismarine-proxy
However this is a bit dangerous and risk creating friction, so it should be done very carefully, and making sure not to introduce high coupling between independent packages
This issue is meant to keep the idea around, but we are not ready to implement this right now.
#1145 may help on this
The end state of this would make mineflayer just a set of mineflayer-* all acting on prismarine-*, it would contain almost no line of code and anyone could make his own version based on node-minecraft-protocol easily
The main thing mineflayer repo would provide is the brand and the organization / examples / central point for documentation.
(in a similar way there would be flying-squid-*)
As said this idea is to be thought about properly before trying it, for example one thing we don't want would be to create one package for each of the current mineflayer plugin. It wouldn't work because :
- they are coupled (one plugin depend on another)
- they have state
So among the things to do to make this kind of refactoring possible we need to :
- move the state to prismarine-world
- split the plugins in coherent and independant subsets
It is not obvious that the second step is possible.