类 ResourceUtils
java.lang.Object
committee.nova.mods.avaritia.api.client.util.ResourceUtils
Created by covers1624 on 11/07/2017.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static net.minecraft.server.packs.resources.ResourcegetResource(String location) Get's an IResource from the resource manager.static net.minecraft.server.packs.resources.ResourcegetResource(net.minecraft.resources.ResourceLocation location) Get's an IResource from the resource manager.static InputStreamgetResourceAsStream(net.minecraft.resources.ResourceLocation resource) Retrieves an InputStream from the standard Vanilla IReloadableResourceManager.static net.minecraft.server.packs.resources.ReloadableResourceManagerGrabs the resource manager.loadResource(net.minecraft.server.packs.resources.ResourceProvider resourceProvider, net.minecraft.resources.ResourceLocation loc) Loads the givenResourceLocationwith the givenResourceProviderinto a list of UTF-8 Strings.static voidregisterReloadListener(net.minecraft.server.packs.resources.ResourceManagerReloadListener reloadListener) Registers a IResourceManagerReloadListener to MC's resource manager.
-
构造器详细资料
-
ResourceUtils
public ResourceUtils()
-
-
方法详细资料
-
getResourceAsStream
public static InputStream getResourceAsStream(net.minecraft.resources.ResourceLocation resource) throws IOException Retrieves an InputStream from the standard Vanilla IReloadableResourceManager.- 参数:
resource- The resource.- 返回:
- The InputStream.
- 抛出:
IOException- If the file is not found or some other IO error occurred.
-
getResourceManager
public static net.minecraft.server.packs.resources.ReloadableResourceManager getResourceManager()Grabs the resource manager.- 返回:
- The resource manager.
-
getResource
public static net.minecraft.server.packs.resources.Resource getResource(String location) throws IOException Get's an IResource from the resource manager.- 参数:
location- The resource to get.- 返回:
- The gotten resource.
- 抛出:
IOException- If the resource doesn't exist, or some other IO error occurred.
-
getResource
public static net.minecraft.server.packs.resources.Resource getResource(net.minecraft.resources.ResourceLocation location) throws IOException Get's an IResource from the resource manager.- 参数:
location- The resource to get.- 返回:
- The gotten resource.
- 抛出:
IOException- If the resource doesn't exist, or some other IO error occurred.
-
registerReloadListener
public static void registerReloadListener(net.minecraft.server.packs.resources.ResourceManagerReloadListener reloadListener) Registers a IResourceManagerReloadListener to MC's resource manager.- 参数:
reloadListener- The listener.
-
loadResource
public static List<String> loadResource(net.minecraft.server.packs.resources.ResourceProvider resourceProvider, net.minecraft.resources.ResourceLocation loc) Loads the givenResourceLocationwith the givenResourceProviderinto a list of UTF-8 Strings.- 参数:
resourceProvider- TheResourceProvider.loc- TheResourceLocation.- 返回:
- The UTF-8 lines of the resource.
-