Claritas now reports MOD, CORE_MOD, TWEAKER, or UNKNOWN for ForgeMods 1.12-.
This commit is contained in:
Binary file not shown.
@@ -1,24 +1,42 @@
|
|||||||
export interface ClaritasModuleMetadata {
|
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
|
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
|
version?: string
|
||||||
/**
|
/**
|
||||||
* Possibly present on ForgeMods 1.12-
|
* Possibly present on ForgeMods (1.7-1.12).
|
||||||
|
* Never present in all other circumstances.
|
||||||
*/
|
*/
|
||||||
name?: string
|
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 {
|
export interface ClaritasResult {
|
||||||
|
|
||||||
[jarPath: string]: ClaritasModuleMetadata | undefined
|
[jarPath: string]: ClaritasModuleMetadata | undefined
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { McModInfo } from '../../../../forge/mcmodinfo'
|
|||||||
import { McModInfoList } from '../../../../forge/mcmodinfolist'
|
import { McModInfoList } from '../../../../forge/mcmodinfolist'
|
||||||
import { BaseForgeModStructure } from '../forgemod.struct'
|
import { BaseForgeModStructure } from '../forgemod.struct'
|
||||||
import { MinecraftVersion } from '../../../../../util/MinecraftVersion'
|
import { MinecraftVersion } from '../../../../../util/MinecraftVersion'
|
||||||
|
import { ForgeModType_1_7 } from '../../../../claritas/ClaritasResult'
|
||||||
|
|
||||||
export class ForgeModStructure17 extends BaseForgeModStructure {
|
export class ForgeModStructure17 extends BaseForgeModStructure {
|
||||||
|
|
||||||
@@ -131,6 +132,18 @@ export class ForgeModStructure17 extends BaseForgeModStructure {
|
|||||||
if(cRes == null) {
|
if(cRes == null) {
|
||||||
this.logger.error(`Claritas failed to yield metadata for ForgeMod ${name}!`)
|
this.logger.error(`Claritas failed to yield metadata for ForgeMod ${name}!`)
|
||||||
this.logger.error('Is this mod malformated or does Claritas need an update?')
|
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
|
const claritasId = cRes?.id
|
||||||
|
|||||||
Reference in New Issue
Block a user