Simple Resource Reload Listener
public interface SimpleResourceReloadListener<T> implements IdentifiableResourceReloadListener
Content copied to clipboard
A simplified version of the "resource reload listener" interface, hiding the peculiarities of the API.
In essence, there are two stages:
- load: create an instance of your data object containing all loaded and processed information,
- apply: apply the information from the data object to the game instance.
The load stage should be self-contained as it can run on any thread! However, the apply stage is guaranteed to run on the game thread.
For a fully synchronous alternative, consider using SynchronousResourceReloader in conjunction with IdentifiableResourceReloadListener.
Parameters
<T>
The data object.
Functions
getFabricDependencies
Link copied to clipboard
getFabricId
Link copied to clipboard
load
Link copied to clipboard
abstract CompletableFuture<T> load(ResourceManager manager, Profiler profiler, Executor executor)
Content copied to clipboard
reload
Link copied to clipboard
CompletableFuture<Void> reload(ResourceReloader.Synchronizer helper, ResourceManager manager, Profiler loadProfiler, Profiler applyProfiler, Executor loadExecutor, Executor applyExecutor)
Content copied to clipboard
abstract CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor)
Content copied to clipboard
Sources
jvm source
Link copied to clipboard