Class ModDiscoverer.MinecraftLocator

  • All Implemented Interfaces:
    net.minecraftforge.forgespi.locating.IModLocator
    Enclosing class:
    ModDiscoverer

    private static class ModDiscoverer.MinecraftLocator
    extends java.lang.Object
    implements net.minecraftforge.forgespi.locating.IModLocator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.file.FileSystem fileSystem  
      private java.nio.file.Path mcJar  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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)  
      private java.nio.file.Path findPathDirectory​(net.minecraftforge.forgespi.locating.IModFile modFile, java.lang.String... path)  
      private java.nio.file.Path findPathJar​(net.minecraftforge.forgespi.locating.IModFile modFile, java.lang.String... path)  
      void initArguments​(java.util.Map<java.lang.String,​?> arguments)  
      boolean isValid​(net.minecraftforge.forgespi.locating.IModFile modFile)  
      java.lang.String name()  
      void scanFile​(net.minecraftforge.forgespi.locating.IModFile modFile, java.util.function.Consumer<java.nio.file.Path> pathConsumer)  
      java.util.List<net.minecraftforge.forgespi.locating.IModFile> scanMods()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mcJar

        private final java.nio.file.Path mcJar
      • fileSystem

        private final java.nio.file.FileSystem fileSystem
    • Constructor Detail

      • MinecraftLocator

        MinecraftLocator()
    • Method Detail

      • scanMods

        public java.util.List<net.minecraftforge.forgespi.locating.IModFile> scanMods()
        Specified by:
        scanMods in interface net.minecraftforge.forgespi.locating.IModLocator
      • name

        public java.lang.String name()
        Specified by:
        name in interface net.minecraftforge.forgespi.locating.IModLocator
      • findPath

        public java.nio.file.Path findPath​(net.minecraftforge.forgespi.locating.IModFile modFile,
                                           java.lang.String... path)
        Specified by:
        findPath in interface net.minecraftforge.forgespi.locating.IModLocator
      • findPathDirectory

        private java.nio.file.Path findPathDirectory​(net.minecraftforge.forgespi.locating.IModFile modFile,
                                                     java.lang.String... path)
      • findPathJar

        private java.nio.file.Path findPathJar​(net.minecraftforge.forgespi.locating.IModFile modFile,
                                               java.lang.String... path)
      • scanFile

        public void scanFile​(net.minecraftforge.forgespi.locating.IModFile modFile,
                             java.util.function.Consumer<java.nio.file.Path> pathConsumer)
        Specified by:
        scanFile in interface net.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 interface net.minecraftforge.forgespi.locating.IModLocator
      • findManifest

        public java.util.Optional<java.util.jar.Manifest> findManifest​(java.nio.file.Path file)
        Specified by:
        findManifest in interface net.minecraftforge.forgespi.locating.IModLocator
      • initArguments

        public void initArguments​(java.util.Map<java.lang.String,​?> arguments)
        Specified by:
        initArguments in interface net.minecraftforge.forgespi.locating.IModLocator
      • isValid

        public boolean isValid​(net.minecraftforge.forgespi.locating.IModFile modFile)
        Specified by:
        isValid in interface net.minecraftforge.forgespi.locating.IModLocator