Class DownloadingPackFinder

  • All Implemented Interfaces:
    IPackFinder

    public class DownloadingPackFinder
    extends java.lang.Object
    implements IPackFinder
    • Field Detail

      • LOGGER

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

        private static final java.util.regex.Pattern SHA1
      • serverPackDir

        private final java.io.File serverPackDir
      • downloadLock

        private final java.util.concurrent.locks.ReentrantLock downloadLock
      • currentDownload

        @Nullable
        private java.util.concurrent.CompletableFuture<?> currentDownload
    • Constructor Detail

      • DownloadingPackFinder

        public DownloadingPackFinder​(java.io.File p_i48116_1_,
                                     ResourceIndex p_i48116_2_)
    • Method Detail

      • getDownloadHeaders

        private static java.util.Map<java.lang.String,​java.lang.String> getDownloadHeaders()
      • downloadAndSelectResourcePack

        public java.util.concurrent.CompletableFuture<?> downloadAndSelectResourcePack​(java.lang.String p_217818_1_,
                                                                                       java.lang.String p_217818_2_)
      • deleteQuietly

        private static void deleteQuietly​(java.io.File p_217811_0_)
      • clearServerPack

        public void clearServerPack()
      • checkHash

        private boolean checkHash​(java.lang.String p_195745_1_,
                                  java.io.File p_195745_2_)
      • clearOldDownloads

        private void clearOldDownloads()
      • setServerPack

        public java.util.concurrent.CompletableFuture<java.lang.Void> setServerPack​(java.io.File p_217816_1_,
                                                                                    IPackNameDecorator p_217816_2_)
      • createProgrammerArtDirPack

        private static FolderPack createProgrammerArtDirPack​(java.io.File p_239459_0_)
      • createProgrammerArtZipPack

        private static IResourcePack createProgrammerArtZipPack​(java.io.File p_239460_0_)