public class ResourcePackRepository
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ResourcePackRepository.Entry |
Modifier and Type | Field and Description |
---|---|
private java.io.File |
dirResourcepacks |
private java.io.File |
dirServerResourcepacks |
private com.google.common.util.concurrent.ListenableFuture<java.lang.Object> |
downloadingPacks |
private java.util.concurrent.locks.ReentrantLock |
lock |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.util.List<ResourcePackRepository.Entry> |
repositoryEntries |
private java.util.List<ResourcePackRepository.Entry> |
repositoryEntriesAll |
private static java.io.FileFilter |
RESOURCE_PACK_FILTER |
IResourcePack |
rprDefaultResourcePack |
MetadataSerializer |
rprMetadataSerializer |
private IResourcePack |
serverResourcePack |
private static java.util.regex.Pattern |
SHA1 |
private static ResourceLocation |
UNKNOWN_PACK_TEXTURE |
Constructor and Description |
---|
ResourcePackRepository(java.io.File dirResourcepacksIn,
java.io.File dirServerResourcepacksIn,
IResourcePack rprDefaultResourcePackIn,
MetadataSerializer rprMetadataSerializerIn,
GameSettings settings) |
Modifier and Type | Method and Description |
---|---|
private boolean |
checkHash(java.lang.String p_190113_1_,
java.io.File p_190113_2_) |
void |
clearResourcePack() |
private void |
deleteOldServerResourcesPacks() |
com.google.common.util.concurrent.ListenableFuture<java.lang.Object> |
downloadResourcePack(java.lang.String url,
java.lang.String hash) |
private void |
fixDirResourcepacks() |
java.io.File |
getDirResourcepacks() |
static java.util.Map<java.lang.String,java.lang.String> |
getDownloadHeaders() |
java.util.List<ResourcePackRepository.Entry> |
getRepositoryEntries() |
java.util.List<ResourcePackRepository.Entry> |
getRepositoryEntriesAll() |
private IResourcePack |
getResourcePack(java.io.File p_191399_1_) |
ResourcePackRepository.Entry |
getResourcePackEntry() |
private java.util.List<java.io.File> |
getResourcePackFiles() |
IResourcePack |
getServerResourcePack() |
void |
setRepositories(java.util.List<ResourcePackRepository.Entry> repositories) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Object> |
setServerResourcePack(java.io.File resourceFile) |
void |
updateRepositoryEntriesAll() |
private boolean |
validatePack(java.io.File p_190112_1_) |
private static final org.apache.logging.log4j.Logger LOGGER
private static final java.io.FileFilter RESOURCE_PACK_FILTER
private static final java.util.regex.Pattern SHA1
private static final ResourceLocation UNKNOWN_PACK_TEXTURE
private final java.io.File dirResourcepacks
public final IResourcePack rprDefaultResourcePack
private final java.io.File dirServerResourcepacks
public final MetadataSerializer rprMetadataSerializer
private IResourcePack serverResourcePack
private final java.util.concurrent.locks.ReentrantLock lock
private com.google.common.util.concurrent.ListenableFuture<java.lang.Object> downloadingPacks
private java.util.List<ResourcePackRepository.Entry> repositoryEntriesAll
private final java.util.List<ResourcePackRepository.Entry> repositoryEntries
public ResourcePackRepository(java.io.File dirResourcepacksIn, java.io.File dirServerResourcepacksIn, IResourcePack rprDefaultResourcePackIn, MetadataSerializer rprMetadataSerializerIn, GameSettings settings)
public static java.util.Map<java.lang.String,java.lang.String> getDownloadHeaders()
private void fixDirResourcepacks()
private java.util.List<java.io.File> getResourcePackFiles()
private IResourcePack getResourcePack(java.io.File p_191399_1_)
public void updateRepositoryEntriesAll()
@Nullable public ResourcePackRepository.Entry getResourcePackEntry()
public java.util.List<ResourcePackRepository.Entry> getRepositoryEntriesAll()
public java.util.List<ResourcePackRepository.Entry> getRepositoryEntries()
public void setRepositories(java.util.List<ResourcePackRepository.Entry> repositories)
public java.io.File getDirResourcepacks()
public com.google.common.util.concurrent.ListenableFuture<java.lang.Object> downloadResourcePack(java.lang.String url, java.lang.String hash)
private boolean checkHash(java.lang.String p_190113_1_, java.io.File p_190113_2_)
private boolean validatePack(java.io.File p_190112_1_)
private void deleteOldServerResourcesPacks()
public com.google.common.util.concurrent.ListenableFuture<java.lang.Object> setServerResourcePack(java.io.File resourceFile)
@Nullable public IResourcePack getServerResourcePack()
public void clearResourcePack()