Package net.minecraft.client.resources
Class DownloadingPackFinder
- java.lang.Object
-
- net.minecraft.client.resources.DownloadingPackFinder
-
- All Implemented Interfaces:
IPackFinder
public class DownloadingPackFinder extends java.lang.Object implements IPackFinder
-
-
Field Summary
Fields Modifier and Type Field Description private ResourceIndex
assetIndex
private java.util.concurrent.CompletableFuture<?>
currentDownload
private java.util.concurrent.locks.ReentrantLock
downloadLock
private static org.apache.logging.log4j.Logger
LOGGER
private ResourcePackInfo
serverPack
private java.io.File
serverPackDir
private static java.util.regex.Pattern
SHA1
private VanillaPack
vanillaPack
-
Constructor Summary
Constructors Constructor Description DownloadingPackFinder(java.io.File p_i48116_1_, ResourceIndex p_i48116_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
checkHash(java.lang.String p_195745_1_, java.io.File p_195745_2_)
private void
clearOldDownloads()
void
clearServerPack()
private static FolderPack
createProgrammerArtDirPack(java.io.File p_239459_0_)
private ResourcePackInfo
createProgrammerArtPack(ResourcePackInfo.IFactory p_239453_1_)
private static ResourcePackInfo
createProgrammerArtPack(ResourcePackInfo.IFactory p_239454_0_, java.util.function.Supplier<IResourcePack> p_239454_1_)
private static IResourcePack
createProgrammerArtZipPack(java.io.File p_239460_0_)
private static void
deleteQuietly(java.io.File p_217811_0_)
java.util.concurrent.CompletableFuture<?>
downloadAndSelectResourcePack(java.lang.String p_217818_1_, java.lang.String p_217818_2_)
private static java.util.Map<java.lang.String,java.lang.String>
getDownloadHeaders()
VanillaPack
getVanillaPack()
void
loadPacks(java.util.function.Consumer<ResourcePackInfo> p_230230_1_, ResourcePackInfo.IFactory p_230230_2_)
java.util.concurrent.CompletableFuture<java.lang.Void>
setServerPack(java.io.File p_217816_1_, IPackNameDecorator p_217816_2_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
SHA1
private static final java.util.regex.Pattern SHA1
-
vanillaPack
private final VanillaPack vanillaPack
-
serverPackDir
private final java.io.File serverPackDir
-
downloadLock
private final java.util.concurrent.locks.ReentrantLock downloadLock
-
assetIndex
private final ResourceIndex assetIndex
-
currentDownload
@Nullable private java.util.concurrent.CompletableFuture<?> currentDownload
-
serverPack
@Nullable private ResourcePackInfo serverPack
-
-
Constructor Detail
-
DownloadingPackFinder
public DownloadingPackFinder(java.io.File p_i48116_1_, ResourceIndex p_i48116_2_)
-
-
Method Detail
-
loadPacks
public void loadPacks(java.util.function.Consumer<ResourcePackInfo> p_230230_1_, ResourcePackInfo.IFactory p_230230_2_)
- Specified by:
loadPacks
in interfaceIPackFinder
-
getVanillaPack
public VanillaPack getVanillaPack()
-
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_)
-
createProgrammerArtPack
@Nullable private ResourcePackInfo createProgrammerArtPack(ResourcePackInfo.IFactory p_239453_1_)
-
createProgrammerArtPack
@Nullable private static ResourcePackInfo createProgrammerArtPack(ResourcePackInfo.IFactory p_239454_0_, java.util.function.Supplier<IResourcePack> p_239454_1_)
-
createProgrammerArtDirPack
private static FolderPack createProgrammerArtDirPack(java.io.File p_239459_0_)
-
createProgrammerArtZipPack
private static IResourcePack createProgrammerArtZipPack(java.io.File p_239460_0_)
-
-