Package net.minecraft.resource
Class ReloadableResourceManagerImpl
java.lang.Object
net.minecraft.resource.ReloadableResourceManagerImpl
- All Implemented Interfaces:
AutoCloseable,ReloadableResourceManager,ResourceManager
public class ReloadableResourceManagerImpl extends Object implements ReloadableResourceManager
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classReloadableResourceManagerImpl.FailedResourceReloadMonitorstatic classReloadableResourceManagerImpl.PackAdditionFailedExceptionNested classes/interfaces inherited from interface net.minecraft.resource.ResourceManager
ResourceManager.Empty -
Field Summary
Fields Modifier and Type Field Description private List<ResourcePack>field_25145private List<ResourceReloadListener>initialListenersprivate List<ResourceReloadListener>listenersprivate static LoggerLOGGERprivate Map<String,NamespaceResourceManager>namespaceManagersprivate Set<String>namespacesprivate ResourceTypetype -
Constructor Summary
Constructors Constructor Description ReloadableResourceManagerImpl(ResourceType type) -
Method Summary
Modifier and Type Method Description voidaddPack(ResourcePack resourcePack)ResourceReloadMonitorbeginMonitoredReload(Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage, List<ResourcePack> packs)protected ResourceReloadMonitorbeginReloadInner(Executor prepareExecutor, Executor applyExecutor, List<ResourceReloadListener> listeners, CompletableFuture<Unit> initialStage)private voidclear()voidclose()booleancontainsResource(Identifier id)Collection<Identifier>findResources(String resourceType, Predicate<String> pathPredicate)Set<String>getAllNamespaces()List<Resource>getAllResources(Identifier id)ResourcegetResource(Identifier id)voidregisterListener(ResourceReloadListener listener)Stream<ResourcePack>streamResourcePacks()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ReloadableResourceManager
beginReload
-
Field Details
-
LOGGER
-
namespaceManagers
-
listeners
-
initialListeners
-
namespaces
-
field_25145
-
type
-
-
Constructor Details
-
ReloadableResourceManagerImpl
-
-
Method Details
-
addPack
-
getAllNamespaces
- Specified by:
getAllNamespacesin interfaceResourceManager
-
getResource
- Specified by:
getResourcein interfaceResourceManager- Throws:
IOException
-
containsResource
- Specified by:
containsResourcein interfaceResourceManager
-
getAllResources
- Specified by:
getAllResourcesin interfaceResourceManager
-
findResources
- Specified by:
findResourcesin interfaceResourceManager
-
clear
private void clear() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceReloadableResourceManager
-
registerListener
- Specified by:
registerListenerin interfaceReloadableResourceManager
-
beginReloadInner
protected ResourceReloadMonitor beginReloadInner(Executor prepareExecutor, Executor applyExecutor, List<ResourceReloadListener> listeners, CompletableFuture<Unit> initialStage) -
beginMonitoredReload
public ResourceReloadMonitor beginMonitoredReload(Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage, List<ResourcePack> packs)- Specified by:
beginMonitoredReloadin interfaceReloadableResourceManager
-
streamResourcePacks
- Specified by:
streamResourcePacksin interfaceResourceManager
-