接口 ResourceFactory
-
- 所有已知子接口:
ReloadableResourceManager,ResourceManager
- 所有已知实现类:
DefaultClientResourcePack,DefaultResourcePack,NamespaceResourceManager,ReloadableResourceManagerImpl,ResourceManager.Empty
public interface ResourceFactoryProvides resource access.- Mappings:
Namespace Name official adnintermediary net/minecraft/class_5912named net/minecraft/resource/ResourceFactory
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ResourcegetResource(Identifier id)Finds and returns the corresponding resource for a resource's identifier.
-
-
-
方法详细资料
-
getResource
Resource getResource(Identifier id) throws IOException
Finds and returns the corresponding resource for a resource's identifier.Starts by scanning each resource pack from highest priority to lowest. If no resource packs were found to contain the requested entry, will throw a
FileNotFoundException.The returned resource must be closed to avoid resource leaks.
- 参数:
id- the resource identifier to search for- 抛出:
FileNotFoundException- if the identified resource could not be found, or could not be loaded.IOException- if the identified resource was found but a stream to it could not be opened.- Mappings:
Namespace Name Mixin selector official aLadn;a(Lwp;)Ladk;intermediary method_14486Lnet/minecraft/class_5912;method_14486(Lnet/minecraft/class_2960;)Lnet/minecraft/class_3298;named getResourceLnet/minecraft/resource/ResourceFactory;getResource(Lnet/minecraft/util/Identifier;)Lnet/minecraft/resource/Resource;
-
-