Interface IModFileReader
- All Superinterfaces:
IOrderedProvider
- All Known Implementing Classes:
JarModsDotTomlModFileReader
,NestedLibraryModReader
Inspects
JarContents
found by IModFileCandidateLocator
and tries to turn them into IModFile
.
Picked up via ServiceLoader.
-
Field Summary
Fields inherited from interface net.neoforged.neoforgespi.locating.IOrderedProvider
DEFAULT_PRIORITY, HIGHEST_SYSTEM_PRIORITY, LOWEST_SYSTEM_PRIORITY
-
Method Summary
Modifier and TypeMethodDescription@Nullable IModFile
read
(cpw.mods.jarhandling.JarContents jar, ModFileDiscoveryAttributes attributes) Provides a mod from the givenjar
.Methods inherited from interface net.neoforged.neoforgespi.locating.IOrderedProvider
getPriority
-
Method Details
-
read
@Nullable @Nullable IModFile read(cpw.mods.jarhandling.JarContents jar, ModFileDiscoveryAttributes attributes) Provides a mod from the givenjar
.Throwing
ModLoadingException
will report contained issues as the reason for incompatibility to players, unless another reader successfully reads the jar.Other thrown exceptions will be reported as errors and cause loading to fail.
- Parameters:
jar
- the mod jar contentsattributes
- The attributes relating to this mod files discovery.- Returns:
null
if this provider can't handle the given jar, otherwise the mod-file created from the given contents and attributes.
-