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 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) Neo: Expose the reload listeners so they can be passed to the event.getResource(ResourceLocation pLocation) getResourceStack(ResourceLocation pLocation) listResources(String pPath, Predicate<ResourceLocation> pFilter) listResourceStacks(String pPath, Predicate<ResourceLocation> pFilter) voidregisterReloadListener(PreparableReloadListener pListener) Deprecated.voidNeo: Updates thelistenerswith the sorted list from the event.Methods 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
Deprecated.Neo: Use.invalid reference
net.neoforged.neoforge.client.event.AddClientReloadListenerEvent- Throws:
UnsupportedOperationException- if called after the event has been fired.
-
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
-
getListeners
Neo: Expose the reload listeners so they can be passed to the event.- Returns:
- The (immutable) list of reload listeners.
-
updateListenersFrom
Neo: Updates thelistenerswith the sorted list from the event.
-
invalid reference