Class JarInJarDependencyLocator
java.lang.Object
net.neoforged.fml.loading.moddiscovery.locators.JarInJarDependencyLocator
- All Implemented Interfaces:
IDependencyLocator,IOrderedProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordprivate static final record -
Field Summary
FieldsFields inherited from interface net.neoforged.neoforgespi.locating.IOrderedProvider
DEFAULT_PRIORITY, HIGHEST_SYSTEM_PRIORITY, LOWEST_SYSTEM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ModLoadingIssuebuildExceptionData(net.neoforged.jarjar.selection.JarSelector.ResolutionFailureInformation<IModFile> entry) private ModLoadingExceptionexception(Collection<net.neoforged.jarjar.selection.JarSelector.ResolutionFailureInformation<IModFile>> failedDependencies) private static StringextractEmbeddedJarFile(IModFile file, String relativePath, Path destination) private StringformatError(JarInJarDependencyLocator.ModWithVersionRange modWithVersionRange) private StringgetErrorTranslationKey(net.neoforged.jarjar.selection.JarSelector.ResolutionFailureInformation<IModFile> entry) getModWithVersionRangeStream(net.neoforged.jarjar.selection.JarSelector.SourceWithRequestedVersionRange<IModFile> file) private StringidentifyMod(IModFile modFile) loadModFileFrom(IModFile file, String relativePath, IDiscoveryPipeline pipeline, Map<JarInJarDependencyLocator.EmbeddedJarKey, IModFile> createdModFiles) private Optional<InputStream> loadResourceFromModFile(IModFile modFile, String relativePath) private static voidmoveExtractedFileIntoPlace(Path source, Path destination) Atomically moves the extracted embedded jar file to its final location.voidscanMods(List<IModFile> loadedMods, IDiscoveryPipeline pipeline) Invoked to find all mod dependencies that this dependency locator can find.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.neoforged.neoforgespi.locating.IOrderedProvider
getPriority
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
JarInJarDependencyLocator
public JarInJarDependencyLocator()
-
-
Method Details
-
scanMods
Description copied from interface:IDependencyLocatorInvoked to find all mod dependencies that this dependency locator can find. It is not guaranteed that all these are loaded into the runtime, as such the result of this method should be seen as a list of candidates to load.- Specified by:
scanModsin interfaceIDependencyLocator
-
loadModFileFrom
private Optional<IModFile> loadModFileFrom(IModFile file, String relativePath, IDiscoveryPipeline pipeline, Map<JarInJarDependencyLocator.EmbeddedJarKey, IModFile> createdModFiles) -
extractEmbeddedJarFile
-
moveExtractedFileIntoPlace
Atomically moves the extracted embedded jar file to its final location. If an atomic move is not supported, the file will be moved normally. -
exception
private ModLoadingException exception(Collection<net.neoforged.jarjar.selection.JarSelector.ResolutionFailureInformation<IModFile>> failedDependencies) -
buildExceptionData
private ModLoadingIssue buildExceptionData(net.neoforged.jarjar.selection.JarSelector.ResolutionFailureInformation<IModFile> entry) -
getErrorTranslationKey
-
getModWithVersionRangeStream
private Stream<JarInJarDependencyLocator.ModWithVersionRange> getModWithVersionRangeStream(net.neoforged.jarjar.selection.JarSelector.SourceWithRequestedVersionRange<IModFile> file) -
formatError
-
identifyMod
-
loadResourceFromModFile
-
toString
-