Skip to content

Commit

Permalink
Add 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed May 11, 2024
1 parent 7c97e63 commit 30adb01
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions version_resolver/src/minecraft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pub enum MinecraftVersion {
Minecraft1_20_4,
#[serde(rename = "1.20.5")]
Minecraft1_20_5,
#[serde(rename = "1.20.6")]
Minecraft1_20_6,
}

impl MinecraftVersion {
Expand All @@ -56,6 +58,7 @@ impl MinecraftVersion {
Self::Minecraft1_20_2 => "1.20.2",
Self::Minecraft1_20_4 => "1.20.4",
Self::Minecraft1_20_5 => "1.20.5",
Self::Minecraft1_20_6 => "1.20.6",
}
}

Expand Down Expand Up @@ -109,6 +112,7 @@ impl MinecraftVersion {
Self::Minecraft1_20_2 => Some("48"),
Self::Minecraft1_20_4 => Some("49"),
Self::Minecraft1_20_5 => None,
Self::Minecraft1_20_6 => None,
}
}

Expand All @@ -127,13 +131,15 @@ impl MinecraftVersion {
Self::Minecraft1_20_2 => "10",
Self::Minecraft1_20_4 => "11",
Self::Minecraft1_20_5 => "12",
Self::Minecraft1_20_6 => "12",
}
}

pub fn neoforge_loader_major(&self) -> Option<&'static str> {
match self {
Self::Minecraft1_20_4 => Some("2"),
Self::Minecraft1_20_5 => Some("2"),
Self::Minecraft1_20_6 => Some("2"),
_ => None,
}
}
Expand All @@ -142,13 +148,15 @@ impl MinecraftVersion {
match self {
Self::Minecraft1_20_4 => Some("20.4"),
Self::Minecraft1_20_5 => Some("20.5"),
Self::Minecraft1_20_6 => Some("20.6"),
_ => None,
}
}

pub fn neoforge_yarn_patch_version(&self) -> Option<&'static str> {
match self {
Self::Minecraft1_20_5 => Some("1.20.5"),
Self::Minecraft1_20_6 => Some("1.20.5"),
_ => None,
}
}
Expand All @@ -168,6 +176,7 @@ impl MinecraftVersion {
Self::Minecraft1_20_2 => Some("18"),
Self::Minecraft1_20_4 => Some("22"),
Self::Minecraft1_20_5 => None,
Self::Minecraft1_20_6 => None,
}
}

Expand Down

0 comments on commit 30adb01

Please sign in to comment.