Class GuiImageSource

java.lang.Object
com.render.api.gui.GuiImageSource

public final class GuiImageSource extends Object
Describes a raster image that can be loaded from a URL or a jar resource.
  • Method Details

    • resource

      public static GuiImageSource resource(net.minecraft.resources.Identifier resourceId)
      Creates an image source backed by a resource inside the jar or active resource packs.
      Parameters:
      resourceId - resource identifier such as modid:textures/gui/panel.png
      Returns:
      image source
    • url

      public static GuiImageSource url(String url)
      Creates an image source backed by a URL.
      Parameters:
      url - image URL
      Returns:
      image source
    • cacheKey

      public String cacheKey()
    • hintWidth

      public float hintWidth()
    • hintHeight

      public float hintHeight()
    • load

      public com.render.api.gui.GuiLoadedAsset load() throws Exception
      Throws:
      Exception
    • generation

      default long generation()