1.13.2: add untested Forge protocol handshake support (#145)
Initial support for the new Forge 1.1+3 server list ping JSON mod parsing
This commit is contained in:
parent
55ff26409a
commit
7279f4177e
|
@ -1204,6 +1204,23 @@ impl Conn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Forge 1.13+ TODO: update for 1.14+ and test
|
||||||
|
if let Some(forge_data) = val.get("forgeData") {
|
||||||
|
if let Some(mods) = forge_data.get("mods") {
|
||||||
|
if let Value::Array(items) = mods {
|
||||||
|
for item in items {
|
||||||
|
if let Value::Object(obj) = item {
|
||||||
|
let modid = obj.get("modId").unwrap().as_str().unwrap().to_string();
|
||||||
|
let modmarker = obj.get("modmarker").unwrap().as_str().unwrap().to_string();
|
||||||
|
|
||||||
|
let version = modmarker;
|
||||||
|
|
||||||
|
forge_mods.push(crate::protocol::forge::ForgeMod { modid, version });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Ok((Status {
|
Ok((Status {
|
||||||
version: StatusVersion {
|
version: StatusVersion {
|
||||||
|
|
Loading…
Reference in New Issue