You've already forked AstralRinth
forked from didirus/AstralRinth
Fix neoforge check, make forge validator more lenient (#928)
This commit is contained in:
@@ -27,6 +27,7 @@ impl super::Validator for ForgeValidator {
|
||||
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
|
||||
) -> Result<ValidationResult, ValidationError> {
|
||||
if archive.by_name("META-INF/mods.toml").is_err()
|
||||
&& archive.by_name("META-INF/MANIFEST.MF").is_err()
|
||||
&& !archive.file_names().any(|x| x.ends_with(".class"))
|
||||
{
|
||||
return Ok(ValidationResult::Warning(
|
||||
@@ -70,6 +71,7 @@ impl super::Validator for LegacyForgeValidator {
|
||||
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
|
||||
) -> Result<ValidationResult, ValidationError> {
|
||||
if archive.by_name("mcmod.info").is_err()
|
||||
&& archive.by_name("META-INF/MANIFEST.MF").is_err()
|
||||
&& !archive.file_names().any(|x| x.ends_with(".class"))
|
||||
{
|
||||
return Ok(ValidationResult::Warning(
|
||||
|
||||
@@ -10,7 +10,7 @@ impl super::Validator for NeoForgeValidator {
|
||||
}
|
||||
|
||||
fn get_supported_loaders(&self) -> &[&str] {
|
||||
&["forge"]
|
||||
&["neoforge"]
|
||||
}
|
||||
|
||||
fn get_supported_game_versions(&self) -> SupportedGameVersions {
|
||||
@@ -23,6 +23,7 @@ impl super::Validator for NeoForgeValidator {
|
||||
) -> Result<ValidationResult, ValidationError> {
|
||||
if archive.by_name("META-INF/mods.toml").is_err()
|
||||
&& archive.by_name("META-INF/neoforge.mods.toml").is_err()
|
||||
&& archive.by_name("META-INF/MANIFEST.MF").is_err()
|
||||
&& !archive.file_names().any(|x| x.ends_with(".class"))
|
||||
{
|
||||
return Ok(ValidationResult::Warning(
|
||||
|
||||
Reference in New Issue
Block a user