diff --git a/libraries/java/Claritas.jar b/libraries/java/Claritas.jar index ffaa9ad4..9cf05018 100644 Binary files a/libraries/java/Claritas.jar and b/libraries/java/Claritas.jar differ diff --git a/src/model/claritas/ClaritasResult.ts b/src/model/claritas/ClaritasResult.ts index a431e1c0..ff02d486 100644 --- a/src/model/claritas/ClaritasResult.ts +++ b/src/model/claritas/ClaritasResult.ts @@ -1,22 +1,40 @@ export interface ClaritasModuleMetadata { /** - * Present on ForgeMods + * Present on ForgeMods (1.7-1.12) of type MOD. + * Possibly present on ForgeMods (1.7-1.12) of type CORE_MOD. + * Always present on ForgeMods 1.13+. + * Never present in all other circumstances. */ id?: string /** - * Always Present + * Never present on ForgeMods (1.7-1.12) of type UNKNOWN. + * Present in all other circumstances. */ - group: string + group?: string /** - * Possibly present on ForgeMods 1.12- + * Possibly present on ForgeMods (1.7-1.12). + * Never present in all other circumstances. */ version?: string /** - * Possibly present on ForgeMods 1.12- + * Possibly present on ForgeMods (1.7-1.12). + * Never present in all other circumstances. */ name?: string + /** + * Always present on ForgeMods (1.7-1.12). + * Never present in all other circumstances. + */ + modType?: ForgeModType_1_7 + +} +export enum ForgeModType_1_7 { + MOD = 'MOD', + CORE_MOD = 'CORE_MOD', + TWEAKER = 'TWEAKER', + UNKNOWN = 'UNKNOWN' } export interface ClaritasResult { diff --git a/src/model/struct/model/module/forgemod/forgemod17.struct.ts b/src/model/struct/model/module/forgemod/forgemod17.struct.ts index ac7cdd1b..5f349436 100644 --- a/src/model/struct/model/module/forgemod/forgemod17.struct.ts +++ b/src/model/struct/model/module/forgemod/forgemod17.struct.ts @@ -5,6 +5,7 @@ import { McModInfo } from '../../../../forge/mcmodinfo' import { McModInfoList } from '../../../../forge/mcmodinfolist' import { BaseForgeModStructure } from '../forgemod.struct' import { MinecraftVersion } from '../../../../../util/MinecraftVersion' +import { ForgeModType_1_7 } from '../../../../claritas/ClaritasResult' export class ForgeModStructure17 extends BaseForgeModStructure { @@ -131,6 +132,18 @@ export class ForgeModStructure17 extends BaseForgeModStructure { if(cRes == null) { this.logger.error(`Claritas failed to yield metadata for ForgeMod ${name}!`) this.logger.error('Is this mod malformated or does Claritas need an update?') + } else { + switch(cRes.modType!) { + case ForgeModType_1_7.CORE_MOD: + this.logger.warn(`CORE_MOD Discovered: ForgeMod ${name} has no @Mod annotation. Metadata inference capabilities are limited.`) + break + case ForgeModType_1_7.TWEAKER: + this.logger.warn(`TWEAKER Discovered: ForgeMod ${name} has no @Mod annotation. Metadata inference capabilities may be limited.`) + break + case ForgeModType_1_7.UNKNOWN: + this.logger.error(`Jar file ${name} is not a ForgeMod. Is it a library?`) + break + } } const claritasId = cRes?.id