Class ExplodedDirectoryLocator

  • All Implemented Interfaces:
    net.minecraftforge.forgespi.locating.IModLocator

    public class ExplodedDirectoryLocator
    extends java.lang.Object
    implements net.minecraftforge.forgespi.locating.IModLocator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.apache.logging.log4j.Logger LOGGER  
      private java.util.Map<net.minecraftforge.forgespi.locating.IModFile,​org.apache.commons.lang3.tuple.Pair<java.nio.file.Path,​java.util.List<java.nio.file.Path>>> mods  
      private java.util.List<org.apache.commons.lang3.tuple.Pair<java.nio.file.Path,​java.util.List<java.nio.file.Path>>> rootDirs  
    • 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)  
      java.nio.file.Path findPath​(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)  
      private void scanIndividualPath​(java.nio.file.Path path, java.util.function.Consumer<java.nio.file.Path> pathConsumer)  
      java.util.List<net.minecraftforge.forgespi.locating.IModFile> scanMods()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface net.minecraftforge.forgespi.locating.IModLocator

        findManifestAndSigners
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • rootDirs

        private final java.util.List<org.apache.commons.lang3.tuple.Pair<java.nio.file.Path,​java.util.List<java.nio.file.Path>>> rootDirs
      • mods

        private final java.util.Map<net.minecraftforge.forgespi.locating.IModFile,​org.apache.commons.lang3.tuple.Pair<java.nio.file.Path,​java.util.List<java.nio.file.Path>>> mods
    • Constructor Detail

      • ExplodedDirectoryLocator

        public ExplodedDirectoryLocator()
    • 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
      • 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
      • scanIndividualPath

        private void scanIndividualPath​(java.nio.file.Path path,
                                        java.util.function.Consumer<java.nio.file.Path> pathConsumer)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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