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 ResourceManager
ResourceManager.Empty -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<PreparableReloadListener> private static final org.slf4j.Loggerprivate CloseableResourceManagerprivate final PackTypeFields inherited from interface ResourceProvider
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createReload(Executor backgroundExecutor, Executor mainThreadExecutor, CompletableFuture<Unit> initialTask, List<PackResources> resourcePacks) Neo: Expose the reload listeners so they can be passed to the event.getResource(Identifier location) getResourceStack(Identifier location) listResources(String directory, Predicate<Identifier> filenameFilter) listResourceStacks(String directory, Predicate<Identifier> filter) voidDeprecated.voidNeo: Updates thelistenerswith the sorted list from the event.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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 backgroundExecutor, Executor mainThreadExecutor, CompletableFuture<Unit> initialTask, List<PackResources> resourcePacks) -
getResource
- Specified by:
getResourcein interfaceResourceProvider
-
getNamespaces
- Specified by:
getNamespacesin interfaceResourceManager
-
getResourceStack
- Specified by:
getResourceStackin interfaceResourceManager
-
listResources
public Map<Identifier, Resource> listResources(String directory, Predicate<Identifier> filenameFilter) - Specified by:
listResourcesin interfaceResourceManager
-
listResourceStacks
public Map<Identifier, List<Resource>> listResourceStacks(String directory, Predicate<Identifier> filter) - 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