Interface IDiscoveryPipeline
- All Superinterfaces:
IIssueReporting
- All Known Implementing Classes:
ModDiscoverer.DiscoveryPipeline
Offers services to
locators
for adding mod files in various stages to the
discovery pipeline.-
Method Summary
Modifier and TypeMethodDescriptionaddJarContent
(cpw.mods.jarhandling.JarContents contents, ModFileDiscoveryAttributes attributes, IncompatibleFileReporting incompatibleFileReporting) boolean
addModFile
(IModFile modFile) Add a pre-created mod file to the discovery pipeline.addPath
(Path path, ModFileDiscoveryAttributes attributes, IncompatibleFileReporting incompatibleFileReporting) addPath
(List<Path> groupedPaths, ModFileDiscoveryAttributes attributes, IncompatibleFileReporting incompatibleFileReporting) @Nullable IModFile
readModFile
(cpw.mods.jarhandling.JarContents jarContents, ModFileDiscoveryAttributes attributes) Use the registered readers to attempt to create a mod-file from the given jar contents.Methods inherited from interface net.neoforged.neoforgespi.IIssueReporting
addIssue
-
Method Details
-
addPath
default Optional<IModFile> addPath(Path path, ModFileDiscoveryAttributes attributes, IncompatibleFileReporting incompatibleFileReporting) Adds a single file or folder to the discovery pipeline, to be further processed by registered readers into a mod file.- Parameters:
path
- The pathattributes
- Additional attributes that describe the circumstance of how this path was discovered.incompatibleFileReporting
- The desired behavior if the given file or folder is deemed to be incompatible with NeoForge.- Returns:
- The resulting mod file if the file or folder was successfully read.
-
addPath
Optional<IModFile> addPath(List<Path> groupedPaths, ModFileDiscoveryAttributes attributes, IncompatibleFileReporting incompatibleFileReporting) Adds a group of files or folders to the discovery pipeline, to be further processed by registered readers into a mod file.- Parameters:
groupedPaths
- A set of files and folders that are combined into a single virtual Jar file for mod loading.attributes
- Additional attributes that describe the circumstance of how this path was discovered.incompatibleFileReporting
- The desired behavior if the given file or folder is deemed to be incompatible with NeoForge.- Returns:
- The resulting mod file if the file or folder was successfully read.
-
addJarContent
Optional<IModFile> addJarContent(cpw.mods.jarhandling.JarContents contents, ModFileDiscoveryAttributes attributes, IncompatibleFileReporting incompatibleFileReporting) Adds a pre-createdjar
to the discovery pipeline to be further processed by registered readers into a mod file.- Parameters:
contents
- The contents of the mod file.attributes
- Additional attributes that describe the circumstance of how this path was discovered.incompatibleFileReporting
- The desired behavior if the given file or folder is deemed to be incompatible with NeoForge.- Returns:
- The resulting mod file if the file or folder was successfully read.
-
addModFile
Add a pre-created mod file to the discovery pipeline. -
readModFile
@Nullable @Nullable IModFile readModFile(cpw.mods.jarhandling.JarContents jarContents, ModFileDiscoveryAttributes attributes) Use the registered readers to attempt to create a mod-file from the given jar contents.- Parameters:
attributes
- Additional attributes that describe the circumstance of how this path was discovered.- Returns:
- The created mod file or null if no reader was able to handle the jar contents.
-