接口 ReloadableResourceManager
-
- 所有超级接口:
AutoCloseable,ResourceFactory,ResourceManager
- 所有已知实现类:
ReloadableResourceManagerImpl
public interface ReloadableResourceManager extends ResourceManager, AutoCloseable
A resource manager that has a reload mechanism. Reloading allows reloaders to update when resources change. Accessing resources in reloads can reduce impact on game performance as well.In each reload, all reloaders in this resource manager will have their reload called.
- 另请参阅:
ResourceReloader- Mappings:
Namespace Name official adjintermediary net/minecraft/class_3296named net/minecraft/resource/ReloadableResourceManager
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 net.minecraft.resource.ResourceManager
ResourceManager.Empty
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 voidclose()voidregisterReloader(ResourceReloader reloader)Registers a resource reloader to this manager.ResourceReloadreload(Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage, List<ResourcePack> packs)Performs a reload.default CompletableFuture<Unit>reload(Executor prepareExecutor, Executor applyExecutor, List<ResourcePack> packs, CompletableFuture<Unit> initialStage)Performs a reload.-
从接口继承的方法 net.minecraft.resource.ResourceFactory
getResource
-
从接口继承的方法 net.minecraft.resource.ResourceManager
containsResource, findResources, getAllNamespaces, getAllResources, streamResourcePacks
-
-
-
-
方法详细资料
-
reload
default CompletableFuture<Unit> reload(Executor prepareExecutor, Executor applyExecutor, List<ResourcePack> packs, CompletableFuture<Unit> initialStage)
Performs a reload. This returns a future that is completed when the reload is completed.- 参数:
prepareExecutor- an executor for the prepare stageapplyExecutor- an executor for the apply stagepacks- a list of resource packs providing resourcesinitialStage- a completable future to be completed before this reload- 返回:
- the future of the reload
- 另请参阅:
reload(Executor, Executor, CompletableFuture, List)- Mappings:
Namespace Name Mixin selector official aLadj;a(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/List;Ljava/util/concurrent/CompletableFuture;)Ljava/util/concurrent/CompletableFuture;intermediary method_14478Lnet/minecraft/class_3296;method_14478(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/List;Ljava/util/concurrent/CompletableFuture;)Ljava/util/concurrent/CompletableFuture;named reloadLnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/List;Ljava/util/concurrent/CompletableFuture;)Ljava/util/concurrent/CompletableFuture;
-
reload
ResourceReload reload(Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage, List<ResourcePack> packs)
Performs a reload. Returns an object that yields some insights to the reload.prepareExecutormay be asynchronous.applyExecutormust synchronize with the game engine so changes are properly made to it. The reload will only begin afterinitialStagehas completed. Earlier elements inpackshave lower priorities.- 参数:
prepareExecutor- an executor for the prepare stageapplyExecutor- an executor for the apply stageinitialStage- a completable future to be completed before this reloadpacks- a list of resource packs providing resources- 返回:
- the reload
- 另请参阅:
ResourceReloader.reload(net.minecraft.resource.ResourceReloader.Synchronizer, net.minecraft.resource.ResourceManager, net.minecraft.util.profiler.Profiler, net.minecraft.util.profiler.Profiler, java.util.concurrent.Executor, java.util.concurrent.Executor)- Mappings:
Namespace Name Mixin selector official aLadj;a(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;Ljava/util/List;)Ladi;intermediary method_18232Lnet/minecraft/class_3296;method_18232(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;Ljava/util/List;)Lnet/minecraft/class_4011;named reloadLnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;Ljava/util/List;)Lnet/minecraft/resource/ResourceReload;
-
registerReloader
void registerReloader(ResourceReloader reloader)
Registers a resource reloader to this manager.- 参数:
reloader- the reloader- Mappings:
Namespace Name Mixin selector official aLadj;a(Ladg;)Vintermediary method_14477Lnet/minecraft/class_3296;method_14477(Lnet/minecraft/class_3302;)Vnamed registerReloaderLnet/minecraft/resource/ReloadableResourceManager;registerReloader(Lnet/minecraft/resource/ResourceReloader;)V
-
close
void close()
- 指定者:
close在接口中AutoCloseable- Mappings:
Namespace Name Mixin selector official closeLadj;close()Vintermediary closeLnet/minecraft/class_3296;close()Vnamed closeLnet/minecraft/resource/ReloadableResourceManager;close()V
-
-