glowstone: panic Unrecognized modinfo type in server ping response: "VANILLA" in {"modList":[],"type":"VANILLA"}', protocol/src/protocol/mod.rs:1246:21
Closed this issue · 2 comments
Connecting to a Glowstone server, snapshot version glowstone-2021.1.0-20210116.193733-27.jar, shows "Channel dropped" in the server list and panics upon connect, with the same message:
thread 'main' panicked at 'Unrecognized modinfo type in server ping response: "VANILLA" in {"modList":[],"type":"VANILLA"}', protocol/src/protocol/mod.rs:1246:21
protocol/src/protocol/mod.rs
if let Some(modinfo) = val.get("modinfo") {
if let Some(modinfo_type) = modinfo.get("type") {
if modinfo_type == "FML" {
...
} else {
panic!(
"Unrecognized modinfo type in server ping response: {} in {}",
modinfo_type, modinfo
);
val
is:
Object({"description": Object({"text": String("A Glowstone server")}), "modinfo": Object({"modList": Array([]), "type": String("VANILLA")}), "players": Object({"max": Number(20), "online": Number(0), "sample": Array([])}), "version": Object({"name": String("1.12.2"), "protocol": Number(340)})})
This is an odd response.. https://wiki.vg/Server_List_Ping does not have these keys, so it is not vanilla. https://wiki.vg/Minecraft_Forge_Handshake#Changes_to_Server_List_Ping shows Forge adds:
"modinfo": {
"type": "FML",
"modList": [
which is what I'm supporting here. Forge handshake support for 1.7.10 - 1.12.2 was added in #88 #134. Forge adds mods with "type": "FML". Glowstone sending "type": "VANILLA" doesn't make much sense, if it was modded it wouldn't be vanilla would it? Suppose I could just log a warning here instead of panic.