-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Typing in chat causes client to disconnect #24
Comments
This is an issue because serverbound chat is not implemented (see #8). At the very least the packet should be defined correctly so the clients are not disconnected. I'll leave this issue open until that is fixed. |
This comment was marked as outdated.
This comment was marked as outdated.
I'm having problems finding the wrongly/not defined packet? It just seems to have 2 additional 0x0 bytes and I can't figure out why. Using this. |
I logged out the decompressed bytes and the parsed packet, and here's what I got
Notice that the |
The packet definition on wiki.vg is likely outdated. |
I found that those 2 remaining bytes is related with last signed messages according to Velocity Player Chat Decoding for versions >=1.19.1 |
This is the decompiled code for that Acknowledgement type. /**
* A record of messages acknowledged by a client.
*
* <p>This holds the messages the client has recently seen, as well as the last
* message they received, if any.
*/
public record LastSeenMessageList.Acknowledgment(LastSeenMessageList lastSeen, Optional<LastSeenMessageList.Entry> lastReceived) {
public LastSeenMessageList.Acknowledgment(PacketByteBuf buf) {
this(new LastSeenMessageList(buf), buf.readOptional(LastSeenMessageList.Entry::LastSeenMessageList.Entry));
}
public void write(PacketByteBuf buf) {
this.lastSeen.write(buf);
buf.writeOptional(this.lastReceived, (buf2, lastReceived) -> lastReceived.write((PacketByteBuf)((Object)buf2)));
}
} So the last 2 bytes we are seeing is a list of entries, and an optional last seen entry. Putting up a PR now. |
* Update ChatMessage definition, prevent typing in chat from kicking players fixes #24 * Update definition for CommandExecution
Using commit
cac348a4b6e788f3ecce24c7559c1789f4c8b402
, running examplecombat
.Server log
How to reproduce
This bug occurs in all examples and non-examples.
The text was updated successfully, but these errors were encountered: