Class ReloadableResourceManager
java.lang.Object
net.minecraft.server.packs.resources.ReloadableResourceManager
- All Implemented Interfaces:
AutoCloseable,ResourceManager,ResourceProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.ResourceManager
ResourceManager.Empty -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<PreparableReloadListener> private static final org.slf4j.Loggerprivate CloseableResourceManagerprivate final PackTypeFields inherited from interface net.minecraft.server.packs.resources.ResourceProvider
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createReload(Executor pBackgroundExecutor, Executor pGameExecutor, CompletableFuture<Unit> pWaitingFor, List<PackResources> pResourcePacks) getResource(ResourceLocation pLocation) getResourceStack(ResourceLocation pLocation) listResources(String pPath, Predicate<ResourceLocation> pFilter) listResourceStacks(String pPath, Predicate<ResourceLocation> pFilter) voidregisterReloadListener(PreparableReloadListener pListener) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.ResourceProvider
getResourceOrThrow, open, openAsReader
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
resources
-
listeners
-
type
-
-
Constructor Details
-
ReloadableResourceManager
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
registerReloadListener
-
createReload
public ReloadInstance createReload(Executor pBackgroundExecutor, Executor pGameExecutor, CompletableFuture<Unit> pWaitingFor, List<PackResources> pResourcePacks) -
getResource
- Specified by:
getResourcein interfaceResourceProvider
-
getNamespaces
- Specified by:
getNamespacesin interfaceResourceManager
-
getResourceStack
- Specified by:
getResourceStackin interfaceResourceManager
-
listResources
public Map<ResourceLocation,Resource> listResources(String pPath, Predicate<ResourceLocation> pFilter) - Specified by:
listResourcesin interfaceResourceManager
-
listResourceStacks
public Map<ResourceLocation,List<Resource>> listResourceStacks(String pPath, Predicate<ResourceLocation> pFilter) - Specified by:
listResourceStacksin interfaceResourceManager
-
listPacks
- Specified by:
listPacksin interfaceResourceManager
-
registerReloadListenerIfNotPresent
-