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

Move all raw packet (bot._client) access to API in mineflayer #53

Open
deathcap opened this issue Feb 20, 2016 · 0 comments
Open

Move all raw packet (bot._client) access to API in mineflayer #53

deathcap opened this issue Feb 20, 2016 · 0 comments

Comments

@deathcap
Copy link
Member

voxel-clientmc listens for and sends some protocol packets itself, but it really ought to only access the API in mineflayer, and have it have intimate knowledge about the packet protocol details. Some of the functionality is not exposed, so to resolve this new API would have to be written. To see the current raw packet usage, grep for _client:

mf-worker.js:    self.bot._client.on('held_item_slot', function(packet) { // TODO: this really should be emitted in mineflayer
mf-worker.js:    self.bot._client.on('resource_pack_send', function(packet) { // TODO: mineflayer api
mf-worker.js:    self.bot._client.emit('connect');
mf-worker.js:    self.bot._client.write('block_dig', {
mf-worker.js:      self.bot._client.write('arm_animation', {
mf-worker.js:    self.bot._client.write('block_dig', {

some functionality should live in voxel-clientmc first before it is developed & stable (such as: #51 more control over digging), then can be PR'd to mineflayer once ready.

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

1 participant