Class TextureComponent

java.lang.Object
mcp.mobius.waila.api.component.TextureComponent
All Implemented Interfaces:
ITooltipComponent

@ClientOnly public class TextureComponent extends Object implements ITooltipComponent
Component that renders a texture.
  • Constructor Details

    • TextureComponent

      public TextureComponent(ResourceLocation textureId, int u, int v, int width, int height)
      Note: the texture must be 256x256 px, use other constructor if you have different sized texture.
      Parameters:
      textureId - the id of the texture
      u - the left-most coordinate of the texture region
      v - the top-most coordinate of the texture region
      width - the width of the rectangle
      height - the height of the rectangle
    • TextureComponent

      public TextureComponent(ResourceLocation textureId, int u, int v, int width, int height, int textureWidth, int textureHeight)
      Parameters:
      textureId - the id of the texture
      u - the left-most coordinate of the texture region
      v - the top-most coordinate of the texture region
      width - the width of the rectangle
      height - the height of the rectangle
      textureWidth - the width of the entire texture
      textureHeight - the height of the entire texture
    • TextureComponent

      public TextureComponent(ResourceLocation textureId, int width, int height, int u, int v, int regionWidth, int regionHeight, int textureWidth, int textureHeight)
      Parameters:
      textureId - the id of the texture
      width - the width of the rectangle
      height - the height of the rectangle
      u - the left-most coordinate of the texture region
      v - the top-most coordinate of the texture region
      regionWidth - the width of the texture region
      regionHeight - the height of the texture region
      textureWidth - the width of the entire texture
      textureHeight - the height of the entire texture
  • Method Details