-
-
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
server: server_data payload sent to clients is incomplete #1362
Comments
1.19 - is a chat component (json) serialized as a string ✅ var1.writeOptional(this.motd, FriendlyByteBuf::writeComponent);
var1.writeOptional(this.iconBase64, FriendlyByteBuf::writeUtf);
var1.writeBoolean(this.previewsChat); 1.19.1/1.19.2 (v760) motd is unchanged ✅ var1.writeOptional(this.motd, FriendlyByteBuf::writeComponent);
var1.writeOptional(this.iconBase64, FriendlyByteBuf::writeUtf);
var1.writeBoolean(this.previewsChat);
var1.writeBoolean(this.enforcesSecureChat); 1.19.3 motd is unchanged ✅ var1.writeOptional(this.motd, FriendlyByteBuf::writeComponent);
var1.writeOptional(this.iconBase64, FriendlyByteBuf::writeUtf);
var1.writeBoolean(this.enforcesSecureChat); 1.19.4 motd is no longer optional ✅ var1.writeComponent(this.motd);
var1.writeOptional(this.iconBytes, FriendlyByteBuf::writeByteArray);
var1.writeBoolean(this.enforcesSecureChat); 1.20.3 remains a chat component, but these have been changed to be NBT instead of json ✅ var1.writeComponent(this.motd);
var1.writeOptional(this.iconBytes, FriendlyByteBuf::writeByteArray);
var1.writeBoolean(this.enforcesSecureChat); 20.5 same minus last field STREAM_CODEC = StreamCodec.composite(
ComponentSerialization.TRUSTED_CONTEXT_FREE_STREAM_CODEC,
ClientboundServerDataPacket::motd,
ByteBufCodecs.BYTE_ARRAY.apply(ByteBufCodecs::optional),
ClientboundServerDataPacket::iconBytes,
ClientboundServerDataPacket::new); icon goes from b64 to raw buffer So mc-data is correct, and nmp is lacking implementation |
✨✨ Here's an AI-assisted sketch of how you might approach this issue saved by @extremeheat using Copilot Workspace v0.27 |
Fixes #1362 Add missing fields to `server_data` payload for versions 1.19+. * Add `motd` and `icon` fields to `server_data` payload for version 1.19. * Add `motd`, `icon`, and `enforcesSecureChat` fields to `server_data` payload for version 1.19.2. * Add `motd`, `icon`, and `enforcesSecureChat` fields to `server_data` payload for version 1.19.3. * Add `motd`, `iconBytes`, and `enforcesSecureChat` fields to `server_data` payload for versions 1.19.4, 1.20, and 1.20.2. * Add `motd`, `iconBytes`, and `enforcesSecureChat` fields to `server_data` payload for version 1.20.3. * Add `motd` and `iconBytes` fields to `server_data` payload for version 1.20.5+. * Use NBT components for `motd` if `chatPacketsUseNbtComponents` feature is supported. * Convert `favicon` to buffer for `iconBytes` field if available. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/PrismarineJS/node-minecraft-protocol/issues/1362?shareId=XXXX-XXXX-XXXX-XXXX).
node-minecraft-protocol/src/server/login.js
Lines 199 to 203 in f258c76
1.19
1.19.2
1.19.3
1.19.4, 1.20, 1.20.2
1.20.3
1.20.5+
Check
icon
actually change from string to bufferNot breaking anything currently though, interestingly
The text was updated successfully, but these errors were encountered: