Class AbstractJarFileLocator
- java.lang.Object
-
- net.minecraftforge.fml.loading.moddiscovery.AbstractJarFileLocator
-
- All Implemented Interfaces:
net.minecraftforge.forgespi.locating.IModLocator
- Direct Known Subclasses:
ClasspathLocator
,MavenDirectoryLocator
,ModsFolderLocator
public abstract class AbstractJarFileLocator extends java.lang.Object implements net.minecraftforge.forgespi.locating.IModLocator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.reflect.Method
ENSURE_INIT
private static org.apache.logging.log4j.Logger
LOGGER
protected java.util.Map<net.minecraftforge.forgespi.locating.IModFile,java.nio.file.FileSystem>
modJars
-
Constructor Summary
Constructors Constructor Description AbstractJarFileLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.nio.file.FileSystem
createFileSystem(net.minecraftforge.forgespi.locating.IModFile modFile)
java.util.Optional<java.util.jar.Manifest>
findManifest(java.nio.file.Path file)
org.apache.commons.lang3.tuple.Pair<java.util.Optional<java.util.jar.Manifest>,java.util.Optional<java.security.CodeSigner[]>>
findManifestAndSigners(java.nio.file.Path file)
java.nio.file.Path
findPath(net.minecraftforge.forgespi.locating.IModFile modFile, java.lang.String... path)
boolean
isValid(net.minecraftforge.forgespi.locating.IModFile modFile)
void
scanFile(net.minecraftforge.forgespi.locating.IModFile file, java.util.function.Consumer<java.nio.file.Path> pathConsumer)
-
-
-
Method Detail
-
createFileSystem
protected java.nio.file.FileSystem createFileSystem(net.minecraftforge.forgespi.locating.IModFile modFile)
-
findPath
public java.nio.file.Path findPath(net.minecraftforge.forgespi.locating.IModFile modFile, java.lang.String... path)
- Specified by:
findPath
in interfacenet.minecraftforge.forgespi.locating.IModLocator
-
scanFile
public void scanFile(net.minecraftforge.forgespi.locating.IModFile file, java.util.function.Consumer<java.nio.file.Path> pathConsumer)
- Specified by:
scanFile
in interfacenet.minecraftforge.forgespi.locating.IModLocator
-
findManifest
public java.util.Optional<java.util.jar.Manifest> findManifest(java.nio.file.Path file)
- Specified by:
findManifest
in interfacenet.minecraftforge.forgespi.locating.IModLocator
-
findManifestAndSigners
public org.apache.commons.lang3.tuple.Pair<java.util.Optional<java.util.jar.Manifest>,java.util.Optional<java.security.CodeSigner[]>> findManifestAndSigners(java.nio.file.Path file)
- Specified by:
findManifestAndSigners
in interfacenet.minecraftforge.forgespi.locating.IModLocator
-
isValid
public boolean isValid(net.minecraftforge.forgespi.locating.IModFile modFile)
- Specified by:
isValid
in interfacenet.minecraftforge.forgespi.locating.IModLocator
-
-