You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm having an error as a client trying to decode chat messages.
First of all, I'm running it on 1.16.5 minecraft server (there is a change in protocol version but I did not see any change in protocol, so I'm not sure if it is not from there).
On my code I used dbg!() on `` and I get this :
[src/engine.rs:51] err = PacketErr {
err: failed to deserialize packet: failed to deserialize json: "failed to deserialize chat from JSON '{\"translate\":\"chat.type.text\",\"with\":[{\"insertion\":\"nicoxxl\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"/tell nicoxxl \"},\"hoverEvent\":{\"action\":\"show_entity\",\"contents\":{\"type\":\"minecraft:player\",\"id\":\"665fbf7d-d38f-3fa1-80a3-3a9a2c7d7220\",\"name\":{\"text\":\"nicoxxl\"}}},\"text\":\"nicoxxl\"},\"Hello BillyBob :)\"]}' :: Error(\"unable to parse one of the translation with entries :: unexpected key in event contents\", line: 1, column: 314)",
}
#[derive(Serialize,Clone,Debug,PartialEq)]pubstructBaseComponent{// Cut some fields above#[serde(skip_serializing_if = "Option::is_none")]pubclick_event:Option<ChatClickEvent>,#[serde(skip_serializing_if = "Option::is_none")]pubhover_event:Option<ChatHoverEvent>,// Cut some field below}
You did not used #[serde(rename = "name")] to swith to camelCase, is that an error or the protocol changed ?
The text was updated successfully, but these errors were encountered:
I recently had this problem. It seems like mcproto is looking for a "value" key in the hoverEvent, but, even though its even specified like that in wiki.vg, that's not the case in the JSON minecraft is sending.
Turning line 1009 in chat.rs from
Hi, I'm having an error as a client trying to decode chat messages.
First of all, I'm running it on 1.16.5 minecraft server (there is a change in protocol version but I did not see any change in protocol, so I'm not sure if it is not from there).
On my code I used
dbg!()
on `` and I get this :The formatted JSON looks like that :
In the code I saw this :
You did not used
#[serde(rename = "name")]
to swith to camelCase, is that an error or the protocol changed ?The text was updated successfully, but these errors were encountered: