Skip to content

Commit

Permalink
fix neoforge 1.20.(x)
Browse files Browse the repository at this point in the history
  • Loading branch information
blarfoon committed Jun 14, 2024
1 parent 1eba557 commit 0d7dfc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion daedalus_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
10 changes: 7 additions & 3 deletions daedalus_client/src/neoforge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 0d7dfc9

Please sign in to comment.