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

Multi-protocol Support #199

Closed
roblabla opened this issue Mar 11, 2015 · 5 comments
Closed

Multi-protocol Support #199

roblabla opened this issue Mar 11, 2015 · 5 comments

Comments

@roblabla
Copy link
Member

This issue is here to track support of multiple protocols.

@rom1504
Copy link
Member

rom1504 commented Mar 29, 2015

@deathcap
Copy link
Member

deathcap commented Feb 7, 2016

With PrismarineJS/node-minecraft-protocol#331, can enable dynamic cross-version protocol support at least in node-minecraft-protocol with this change (for example):

--- a/examples/echo.js
+++ b/examples/echo.js

 var bot = mineflayer.createBot({
+  version: false,
   host: process.argv[2],
   port: parseInt(process.argv[3]),
   username: process.argv[4] ? process.argv[4] : "echo",

The client will no longer be kicked when connecting to a 1.9 (15w40b) server, as it would from 1.8.9. But the chunk format changed, at least lib/plugins/blocks.js would need to be updated:

mineflayer $ node examples/echo.js localhost 9999
You are using a pure-javascript implementation of RSA.
Your performance might be subpar. Please consider installing URSA

assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: 61696 === 31613
    at addColumn (/Users/admin/games/voxeljs/mineflayer/lib/plugins/blocks.js:85:12)
    at Client.<anonymous> (/Users/admin/games/voxeljs/mineflayer/lib/plugins/blocks.js:188:5)
    at emitTwo (events.js:87:13)
    at Client.emit (events.js:172:7)
    at Parser.<anonymous> (/Users/admin/games/voxeljs/node-minecraft-protocol/dist/client.js:92:16)
    at emitOne (events.js:77:13)
    at Parser.emit (events.js:169:7)
    at readableAddChunk (/Users/admin/games/voxeljs/node-minecraft-protocol/node_modules/readable-stream/lib/_stream_readable.js:195:16)
    at Parser.Readable.push (/Users/admin/games/voxeljs/node-minecraft-protocol/node_modules/readable-stream/lib/_stream_readable.js:162:10)
    at Parser.Transform.push (/Users/admin/games/voxeljs/node-minecraft-protocol/node_modules/readable-stream/lib/_stream_transform.js:145:32)

@rom1504
Copy link
Member

rom1504 commented Feb 7, 2016

Yeah handling high level features in a cross version way is something to be done before that can works. I described one way I think could work in PrismarineJS/node-minecraft-protocol#231
Basically it's kind of needed to have some kind of abstraction layer on top of packets which would be version independent and that mineflayer could rely on.
It would also be possible to build that within mineflayer to begin with, not sure if that would be simpler than doing it generally though.

@rom1504
Copy link
Member

rom1504 commented Feb 7, 2016

well for the chunk part, the various format should probably just be handled by prismarine-chunk (part of prismarine-world)

@rom1504
Copy link
Member

rom1504 commented Jan 23, 2017

multi-protocol support is there. Dynamic cross version tracked in #468

@rom1504 rom1504 closed this as completed Jan 23, 2017
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