Class SimplePreparableReloadListener<T>
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<T>
- All Implemented Interfaces:
PreparableReloadListener
- Direct Known Subclasses:
FoliageColorReloadListener
,GpuWarnlistManager
,GrassColorReloadListener
,PeriodicNotificationManager
,SimpleJsonResourceReloadListener
,SoundManager
,SplashManager
public abstract class SimplePreparableReloadListener<T>
extends ContextAwareReloadListener
implements PreparableReloadListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
apply
(T pObject, ResourceManager pResourceManager, ProfilerFiller pProfiler) protected abstract T
prepare
(ResourceManager pResourceManager, ProfilerFiller pProfiler) Performs any reloading that can be done off-thread, such as file IOfinal CompletableFuture
<Void> reload
(PreparableReloadListener.PreparationBarrier pStage, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
getContext, getRegistryLookup, injectContext, makeConditionalOps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Constructor Details
-
SimplePreparableReloadListener
public SimplePreparableReloadListener()
-
-
Method Details
-
reload
public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier pStage, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) - Specified by:
reload
in interfacePreparableReloadListener
-
prepare
Performs any reloading that can be done off-thread, such as file IO -
apply
protected abstract void apply(T pObject, ResourceManager pResourceManager, ProfilerFiller pProfiler)
-