rob9315 / mcproxy

a minecraft proxy library powered by mineflayer
GNU General Public License v3.0
16 stars 6 forks source link

multi-version support #4

Open rob9315 opened 3 years ago

rob9315 commented 3 years ago

(originally by @czho)

Been using this library for a little while for one of the projects and cant for the life of me get it working on 1.16, like the 2b2t test server is on. gives me this error when the proxyclient is connected:

TypeError: Serialization error for play.toClient : SizeOf error for undefined : Cannot read property 'length' of undefined at eval (eval at compile (/root/skynet-proxy/node_modules/protodef/src/compiler.js:245:12), <anonymous>:1069:39) at Object.packet_login (eval at compile (/root/skynet-proxy/node_modules/protodef/src/compiler.js:245:12), <anonymous>:1074:9) at eval (eval at compile (/root/skynet-proxy/node_modules/protodef/src/compiler.js:245:12), <anonymous>:2292:50) at packet (eval at compile (/root/skynet-proxy/node_modules/protodef/src/compiler.js:245:12), <anonymous>:2346:9) at CompiledProtodef.sizeOf (/root/skynet-proxy/node_modules/protodef/src/compiler.js:77:14) at e.message (/root/skynet-proxy/node_modules/protodef/src/compiler.js:84:40) at tryCatch (/root/skynet-proxy/node_modules/protodef/src/utils.js:50:16) at CompiledProtodef.createPacketBuffer (/root/skynet-proxy/node_modules/protodef/src/compiler.js:84:20) at Serializer.createPacketBuffer (/root/skynet-proxy/node_modules/protodef/src/serializer.js:12:23) at Serializer._transform (/root/skynet-proxy/node_modules/protodef/src/serializer.js:18:18) { field: 'play.toClient' }

and this error on the client side: image

[answer by @rob9315]

different version support is theoretically planned, though i do not have much time right now. This still has the main purpose to be 2b2t compliant, and with that, 1.12.2 compliant. If you get it working, be sure to create a pull request. The problem is that there are major version differences between 1.12 and everything after it, it could be fixed with a lot of if statements somewhere or adding the option to select which version a server is running before connecting.

[answer by @czho]

oh ok, I get not having that much time, no worries. I was just confused, if I get 1.16 working on a fork of this, I will defiantly add it to this library. I get what you mean by major differences between versions, I've just seen alot of node-minecraft-protocol that automatically support newer version because of cross compatibility with that library.

rob9315 commented 3 years ago

multi-version support will be split into two endeavours:

the focus will first lie on same version support, below a table to track progress.

server vesion \ client version 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16
1.8
1.9
1.10
1.11
1.12
1.13
1.14
1.15
1.16
Maks-gaming commented 1 year ago

dead?

rob9315 commented 1 year ago

I'm no longer working on this. There are some forks like that from IceTank which have continued development, maybe that is more what you'd like to have. If not I'd encourage you to fork yourself and add features you would like to have.