Class NeoForgeModLoading
java.lang.Object
mods.thecomputerizer.theimpossiblelibrary.neoforge.core.loader.NeoForgeModLoading
Helper methods for common functionalities between all 1.20.4+ versions of NeoForge mod loading
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic cpw.mods.jarhandling.JarContentsbuildJarContents(String moduleName, Path... paths) static ObjectcreateDiscoveryAttributes(Object readerOrLocator) static net.neoforged.neoforgespi.locating.IModFile[]createLoaderFiles(cpw.mods.jarhandling.JarContents[] contents, Object locator, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModCandidate candidate, Collection<?> infos) Create separate LIBRARY and MOD type mod files for this library.createLoaderManfiest(Path sourcePath) static net.neoforged.neoforgespi.locating.IModFilecreateModFile(Object pathOrJarContents, Object locator, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModCandidate candidate, Collection<?> infos, net.neoforged.neoforgespi.locating.IModFile.Type type) findManifest(Path path) findManifest(Path path, @Nullable Supplier<Manifest> fallback) static voidfindPaths(ClassLoader classLoader, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionLoaderAPI loader) static net.neoforged.neoforgespi.language.IModFileInfogetFileInfo(net.neoforged.neoforgespi.locating.IModFile file, Collection<?> infos) Also initializes the info mapstatic net.neoforged.neoforgespi.locating.IModFile.TypegetModFileType(String name) static booleanidentifyMods(net.neoforged.neoforgespi.locating.IModFile file) Called via ASM from the generated ModFile extensionstatic net.neoforged.neoforgespi.language.IConfigurableinitFileConfig(Collection<?> infos) static voidinitModLoading(ClassLoader loader, Object locator) static com.electronwill.nightconfig.core.Configstatic net.neoforged.neoforgespi.locating.IModFilelangProviderModFile(net.neoforged.neoforgespi.locating.IModFile reference, String moduleName) static voidpopulateMultiversionData(Map<mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModInfo, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModData> infoMap, Map<String, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModData> dataMap) static voidqueryCoreMods(Object file) static voidqueryCoreMods(String... resourcePaths) Called via ASM from the generated ModFile extensionstatic <F> List<F>scanMods()Returns the list of modsstatic booleansetLoadingVersion(Class<?> caller) Returns false if the version was not set correctlystatic ObjectupdateDiscoveryAttributes(Object attributes, String method, Object updateWith) static voidupdateDiscoveryAttributes(net.neoforged.neoforgespi.locating.IModFile file, String method, Object updateWith) static net.neoforged.neoforgespi.language.ModFileScanDatawriteMods(net.neoforged.fml.loading.moddiscovery.ModFile file) Called via the dynamically generated ModFile extension class
-
Constructor Details
-
NeoForgeModLoading
public NeoForgeModLoading()
-
-
Method Details
-
buildJarContents
-
createDiscoveryAttributes
-
createLoaderManfiest
-
createLoaderFiles
public static net.neoforged.neoforgespi.locating.IModFile[] createLoaderFiles(cpw.mods.jarhandling.JarContents[] contents, Object locator, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModCandidate candidate, Collection<?> infos) Create separate LIBRARY and MOD type mod files for this library. This should only be called from TILSelfLocator in 1.20.6+ -
createModFile
public static net.neoforged.neoforgespi.locating.IModFile createModFile(Object pathOrJarContents, Object locator, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModCandidate candidate, Collection<?> infos, net.neoforged.neoforgespi.locating.IModFile.Type type) -
findManifest
-
findManifest
-
findPaths
public static void findPaths(ClassLoader classLoader, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionLoaderAPI loader) -
getFileInfo
public static net.neoforged.neoforgespi.language.IModFileInfo getFileInfo(net.neoforged.neoforgespi.locating.IModFile file, Collection<?> infos) Also initializes the info map -
getModFileType
-
identifyMods
public static boolean identifyMods(net.neoforged.neoforgespi.locating.IModFile file) Called via ASM from the generated ModFile extension -
initFileConfig
-
initModLoading
-
langProviderConfig
public static com.electronwill.nightconfig.core.Config langProviderConfig() -
langProviderModFile
public static net.neoforged.neoforgespi.locating.IModFile langProviderModFile(net.neoforged.neoforgespi.locating.IModFile reference, String moduleName) -
populateMultiversionData
public static void populateMultiversionData(Map<mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModInfo, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModData> infoMap, Map<String, mods.thecomputerizer.theimpossiblelibrary.api.core.loader.MultiVersionModData> dataMap) -
queryCoreMods
Called via ASM from the generated ModFile extension -
queryCoreMods
-
scanMods
Returns the list of mods -
setLoadingVersion
Returns false if the version was not set correctly -
updateDiscoveryAttributes
-
updateDiscoveryAttributes
-
writeMods
public static net.neoforged.neoforgespi.language.ModFileScanData writeMods(net.neoforged.fml.loading.moddiscovery.ModFile file) Called via the dynamically generated ModFile extension class
-