public class SimpleReloadableResourceManager extends java.lang.Object implements IReloadableResourceManager
Modifier and Type | Class and Description |
---|---|
static class |
SimpleReloadableResourceManager.FailedPackException |
(package private) static class |
SimpleReloadableResourceManager.FailedPackReloader |
Modifier and Type | Field and Description |
---|---|
private java.util.List<IFutureReloadListener> |
initTaskQueue |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.lang.Thread |
mainThread |
private java.util.Map<java.lang.String,FallbackResourceManager> |
namespaceResourceManagers |
private java.util.List<IFutureReloadListener> |
reloadListeners |
private java.util.Set<java.lang.String> |
resourceNamespaces |
private ResourcePackType |
type |
Constructor and Description |
---|
SimpleReloadableResourceManager(ResourcePackType side,
java.lang.Thread p_i50689_2_) |
Modifier and Type | Method and Description |
---|---|
void |
addReloadListener(IFutureReloadListener p_219534_1_) |
void |
addResourcePack(IResourcePack resourcePack) |
private void |
clearResourceNamespaces() |
java.util.Collection<ResourceLocation> |
getAllResourceLocations(java.lang.String pathIn,
java.util.function.Predicate<java.lang.String> filter) |
java.util.List<IResource> |
getAllResources(ResourceLocation resourceLocationIn) |
IResource |
getResource(ResourceLocation resourceLocationIn) |
java.util.Set<java.lang.String> |
getResourceNamespaces() |
boolean |
hasResource(ResourceLocation p_219533_1_) |
protected IAsyncReloader |
initializeAsyncReloader(java.util.concurrent.Executor backgroundExecutor,
java.util.concurrent.Executor gameExecutor,
java.util.List<IFutureReloadListener> listeners,
java.util.concurrent.CompletableFuture<Unit> waitingFor) |
IAsyncReloader |
reloadResources(java.util.concurrent.Executor backgroundExecutor,
java.util.concurrent.Executor gameExecutor,
java.util.concurrent.CompletableFuture<Unit> waitingFor,
java.util.List<IResourcePack> p_219537_4_) |
java.util.concurrent.CompletableFuture<Unit> |
reloadResourcesAndThen(java.util.concurrent.Executor p_219536_1_,
java.util.concurrent.Executor p_219536_2_,
java.util.List<IResourcePack> p_219536_3_,
java.util.concurrent.CompletableFuture<Unit> p_219536_4_) |
private static final org.apache.logging.log4j.Logger LOGGER
private final java.util.Map<java.lang.String,FallbackResourceManager> namespaceResourceManagers
private final java.util.List<IFutureReloadListener> reloadListeners
private final java.util.List<IFutureReloadListener> initTaskQueue
private final java.util.Set<java.lang.String> resourceNamespaces
private final ResourcePackType type
private final java.lang.Thread mainThread
public SimpleReloadableResourceManager(ResourcePackType side, java.lang.Thread p_i50689_2_)
public void addResourcePack(IResourcePack resourcePack)
public java.util.Set<java.lang.String> getResourceNamespaces()
getResourceNamespaces
in interface IResourceManager
public IResource getResource(ResourceLocation resourceLocationIn) throws java.io.IOException
getResource
in interface IResourceManager
java.io.IOException
public boolean hasResource(ResourceLocation p_219533_1_)
hasResource
in interface IResourceManager
public java.util.List<IResource> getAllResources(ResourceLocation resourceLocationIn) throws java.io.IOException
getAllResources
in interface IResourceManager
java.io.IOException
public java.util.Collection<ResourceLocation> getAllResourceLocations(java.lang.String pathIn, java.util.function.Predicate<java.lang.String> filter)
getAllResourceLocations
in interface IResourceManager
private void clearResourceNamespaces()
public java.util.concurrent.CompletableFuture<Unit> reloadResourcesAndThen(java.util.concurrent.Executor p_219536_1_, java.util.concurrent.Executor p_219536_2_, java.util.List<IResourcePack> p_219536_3_, java.util.concurrent.CompletableFuture<Unit> p_219536_4_)
reloadResourcesAndThen
in interface IReloadableResourceManager
public void addReloadListener(IFutureReloadListener p_219534_1_)
addReloadListener
in interface IReloadableResourceManager
protected IAsyncReloader initializeAsyncReloader(java.util.concurrent.Executor backgroundExecutor, java.util.concurrent.Executor gameExecutor, java.util.List<IFutureReloadListener> listeners, java.util.concurrent.CompletableFuture<Unit> waitingFor)
public IAsyncReloader reloadResources(java.util.concurrent.Executor backgroundExecutor, java.util.concurrent.Executor gameExecutor, java.util.concurrent.CompletableFuture<Unit> waitingFor, java.util.List<IResourcePack> p_219537_4_)
reloadResources
in interface IReloadableResourceManager