Class LibraryManager


  • public class LibraryManager
    extends java.lang.Object
    • Field Detail

      • LOGGER

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

        public static final boolean DISABLE_EXTERNAL_MANIFEST
      • ENABLE_AUTO_MOD_MOVEMENT

        public static final boolean ENABLE_AUTO_MOD_MOVEMENT
      • LIBRARY_DIRECTORY_OVERRIDE

        private static final java.lang.String LIBRARY_DIRECTORY_OVERRIDE
      • skipContainedDeps

        private static final java.util.List<java.lang.String> skipContainedDeps
      • MOD_FILENAME_FILTER

        private static final java.io.FilenameFilter MOD_FILENAME_FILTER
      • FILE_NAME_SORTER_INSENSITVE

        private static final java.util.Comparator<java.io.File> FILE_NAME_SORTER_INSENSITVE
      • MODSIDE

        public static final java.util.jar.Attributes.Name MODSIDE
      • MODCONTAINSDEPS

        private static final java.util.jar.Attributes.Name MODCONTAINSDEPS
      • MAVEN_ARTIFACT

        private static final java.util.jar.Attributes.Name MAVEN_ARTIFACT
      • TIMESTAMP

        private static final java.util.jar.Attributes.Name TIMESTAMP
      • MD5

        private static final java.util.jar.Attributes.Name MD5
      • libraries_dir

        private static Repository libraries_dir
      • processed

        private static java.util.Set<java.io.File> processed
    • Constructor Detail

      • LibraryManager

        public LibraryManager()
    • Method Detail

      • setup

        public static void setup​(java.io.File minecraftHome)
      • findLibraryFolder

        private static java.io.File findLibraryFolder​(java.io.File minecraftHome)
      • cleanDirectory

        private static void cleanDirectory​(java.io.File dir,
                                           ModList modlist,
                                           java.io.File... modDirs)
      • extractPacked

        private static org.apache.commons.lang3.tuple.Pair<Artifact,​byte[]> extractPacked​(java.io.File file,
                                                                                                ModList modlist,
                                                                                                java.io.File... modDirs)
      • extractPacked

        private static org.apache.commons.lang3.tuple.Pair<Artifact,​byte[]> extractPacked​(java.util.jar.JarFile jar,
                                                                                                ModList modlist,
                                                                                                java.io.File... modDirs)
                                                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readArtifact

        private static Artifact readArtifact​(Repository repo,
                                             java.util.jar.Attributes meta)
      • readAll

        private static byte[] readAll​(java.io.InputStream in)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • flattenLists

        public static java.util.List<Artifact> flattenLists​(java.io.File mcDir)
      • gatherLegacyCanidates

        public static java.util.List<java.io.File> gatherLegacyCanidates​(java.io.File mcDir)
      • getDefaultRepo

        public static Repository getDefaultRepo()