-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
support 1.21.3 #1347
support 1.21.3 #1347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Env: Node 22.1.0)
After replaying these changes, this successfully mitigates the message
Error: unsupported protocol version: 1.21.3
And the version
set to 1.21.3
no longer throws with my 1.21.3 server:
Error: This server is version 1.21.3, you are using version 1.21.1, please specify the correct version in the options.
From this perspective, this seems to be a valid change, but I get a sequent error on another level in the end, does it correlate with the change or is it something else?
/node_modules/protodef/src/compiler.js:405
throw new Error('Unknown parametrizable type: ' + type[0])
^
Error: Unknown parametrizable type: registryEntryHolder
at SizeOfCompiler.compileType (node_modules/protodef/src/compiler.js:405:13)
at SizeOfCompiler.callType (node_modules/protodef/src/compiler.js:426:23)
at module.exports.SizeOf.container (node_modules/protodef/src/datatypes/compiler-structures.js:159:39)
at SizeOfCompiler.compileType (node_modules/protodef/src/compiler.js:401:90)
at SizeOfCompiler.callType (node_modules/protodef/src/compiler.js:426:23)
at module.exports.SizeOf.switch (node_modules/protodef/src/datatypes/compiler-conditional.js:76:67)
at SizeOfCompiler.compileType (node_modules/protodef/src/compiler.js:401:90)
at SizeOfCompiler.callType (node_modules/protodef/src/compiler.js:426:23)
at module.exports.SizeOf.container (node_modules/protodef/src/datatypes/compiler-structures.js:159:39)
at SizeOfCompiler.compileType (node_modules/protodef/src/compiler.js:401:90)
This is still a work-in-progress PR. 1.21.3 support is scattered among multiple repositories, so you shouldn't expect it to work based on the PR of only one repository. |
src/datatypes/compiler-minecraft.js
Outdated
const set = [] | ||
let accSize = nSize | ||
for (let i = 0; i < n - 1; i++) { | ||
const entry = ${compiler.callType(opts.otherwise.type)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to const entry = ${compiler.callType(opts.otherwise.type, 'offset + accSize')}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/datatypes/compiler-minecraft.js
Outdated
return compiler.wrapCode(` | ||
const { value: n, size: nSize } = ${compiler.callType('varint')} | ||
if (n === 0) { | ||
const base = ${compiler.callType(opts.base.type)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to const base = ${compiler.callType(opts.base.type, 'offset + nSize')}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -61,6 +62,56 @@ module.exports = { | |||
code += '}\n' | |||
code += 'return { value: data, size }' | |||
return compiler.wrapCode(code) | |||
}], | |||
bitflags: ['parametrizable', (compiler, { type, flags, shift, big }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is bit flags here instead of protodef?
* Remove debug logging * Fix benchmark tests for 1.21.3 * Start updating packetTest for 1.21.3 * Update packetTest.js with new types * Fix minecraft-compiler * Speedup tests by setting world type to flat and disabling structures. * Didn't mean to commit that
No description provided.