From 0d7dfc9fc45c72970d012255ffb64c550b099415 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 14 Jun 2024 19:32:25 +0200 Subject: [PATCH] fix neoforge 1.20.(x) --- daedalus_client/Cargo.toml | 2 +- daedalus_client/src/neoforge.rs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/daedalus_client/Cargo.toml b/daedalus_client/Cargo.toml index 80dcb42..1292419 100644 --- a/daedalus_client/Cargo.toml +++ b/daedalus_client/Cargo.toml @@ -35,7 +35,7 @@ path-slash = "0.2.1" sentry = "0.32.1" [features] -default = ["sentry", "forge", "fabric", "quilt", "neoforge"] +default = ["neoforge"] sentry = [] forge = [] fabric = [] diff --git a/daedalus_client/src/neoforge.rs b/daedalus_client/src/neoforge.rs index 8ceecd1..675e89b 100644 --- a/daedalus_client/src/neoforge.rs +++ b/daedalus_client/src/neoforge.rs @@ -468,9 +468,13 @@ pub async fn fetch_maven_metadata( let mut parts = value.split('.'); - if let Some(major) = parts.next() { - if let Some(minor) = parts.next() { - let game_version = format!("1.{}.{}", major, minor); + if let Some(minor) = parts.next() { + if let Some(patch) = parts.next() { + let mut game_version = format!("1.{}", minor); + + if patch != "0" { + game_version.push_str(&format!(".{}", patch)); + } map.entry(game_version.clone()).or_default().push(( original.clone(),