Neoforge support (#653)

This commit is contained in:
Geometrically
2023-08-21 17:39:39 -04:00
committed by GitHub
parent 7bea362503
commit 2d3baff031
14 changed files with 111 additions and 40 deletions

View File

@@ -18,6 +18,7 @@ pub struct Metadata {
pub forge: LoaderManifest,
pub fabric: LoaderManifest,
pub quilt: LoaderManifest,
pub neoforge: LoaderManifest,
}
impl Metadata {
@@ -26,7 +27,7 @@ impl Metadata {
}
pub async fn fetch() -> crate::Result<Self> {
let (minecraft, forge, fabric, quilt) = tokio::try_join! {
let (minecraft, forge, fabric, quilt, neoforge) = tokio::try_join! {
async {
let url = Self::get_manifest("minecraft");
fetch_version_manifest(Some(&url)).await
@@ -42,6 +43,10 @@ impl Metadata {
async {
let url = Self::get_manifest("quilt");
fetch_loader_manifest(&url).await
},
async {
let url = Self::get_manifest("neo");
fetch_loader_manifest(&url).await
}
}?;
@@ -50,6 +55,7 @@ impl Metadata {
forge,
fabric,
quilt,
neoforge,
})
}

View File

@@ -205,6 +205,7 @@ pub enum ModLoader {
Forge,
Fabric,
Quilt,
NeoForge,
}
impl std::fmt::Display for ModLoader {
@@ -214,6 +215,7 @@ impl std::fmt::Display for ModLoader {
Self::Forge => "Forge",
Self::Fabric => "Fabric",
Self::Quilt => "Quilt",
Self::NeoForge => "NeoForge",
})
}
}
@@ -225,6 +227,7 @@ impl ModLoader {
Self::Forge => "forge",
Self::Fabric => "fabric",
Self::Quilt => "quilt",
Self::NeoForge => "neoforge",
}
}
}