mcproxy icon indicating copy to clipboard operation
mcproxy copied to clipboard

multi-version support

Open rob9315 opened this issue 3 years ago • 3 comments

(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 avatar May 16 '21 22:05 rob9315