类 ResourceUtils

java.lang.Object
committee.nova.mods.avaritia.api.client.util.ResourceUtils

public class ResourceUtils extends Object
Created by covers1624 on 11/07/2017.
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static net.minecraft.server.packs.resources.Resource
    getResource(String location)
    Get's an IResource from the resource manager.
    static net.minecraft.server.packs.resources.Resource
    getResource(net.minecraft.resources.ResourceLocation location)
    Get's an IResource from the resource manager.
    getResourceAsStream(net.minecraft.resources.ResourceLocation resource)
    Retrieves an InputStream from the standard Vanilla IReloadableResourceManager.
    static net.minecraft.server.packs.resources.ReloadableResourceManager
    Grabs the resource manager.
    static List<String>
    loadResource(net.minecraft.server.packs.resources.ResourceProvider resourceProvider, net.minecraft.resources.ResourceLocation loc)
    Loads the given ResourceLocation with the given ResourceProvider into a list of UTF-8 Strings.
    static void
    registerReloadListener(net.minecraft.server.packs.resources.ResourceManagerReloadListener reloadListener)
    Registers a IResourceManagerReloadListener to MC's resource manager.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • 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 given ResourceLocation with the given ResourceProvider into a list of UTF-8 Strings.
      参数:
      resourceProvider - The ResourceProvider.
      loc - The ResourceLocation.
      返回:
      The UTF-8 lines of the resource.