Record Class InlineRenderer.TextRenderingContext

java.lang.Object
java.lang.Record
com.samsthenerd.inline.api.client.InlineRenderer.TextRenderingContext
Record Components:
isGlowy - indicates if this text *is* an outline.
outlineColor - indicates if the text *has* an outline (that would be rendered separately) and what color it is. -1 if no outline.
usableColor - argb value for the color of the text. Takes into account the argb float values here as well as the text's style.
Enclosing interface:
InlineRenderer<D extends InlineData<D>>

public static record InlineRenderer.TextRenderingContext(int light, boolean shadow, float brightnessMultiplier, float red, float green, float blue, float alpha, net.minecraft.client.font.TextRenderer.TextLayerType layerType, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, boolean isGlowy, int outlineColor, int usableColor) extends Record
A collection of values taken from the text renderer. Notably the argb color of the text (mostly useful for the transparency), whether or not it's the drop shadow, and the VertexConsumerProvider that came from the text renderer. Note that generally this vc provider will be the same as the one given in the render call's DrawContext.

  • Constructor Summary

    Constructors
    Constructor
    Description
    TextRenderingContext(int light, boolean shadow, float brightnessMultiplier, float red, float green, float blue, float alpha, net.minecraft.client.font.TextRenderer.TextLayerType layerType, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, boolean isGlowy, int outlineColor, int usableColor)
    Creates an instance of a TextRenderingContext record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the alpha record component.
    float
    Returns the value of the blue record component.
    float
    Returns the value of the brightnessMultiplier record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
    Returns the value of the green record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isGlowy record component.
    net.minecraft.client.font.TextRenderer.TextLayerType
    Returns the value of the layerType record component.
    int
    Returns the value of the light record component.
    int
    Returns the value of the outlineColor record component.
    float
    red()
    Returns the value of the red record component.
    boolean
    Returns the value of the shadow record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the usableColor record component.
    net.minecraft.client.render.VertexConsumerProvider
    Returns the value of the vertexConsumers record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TextRenderingContext

      public TextRenderingContext(int light, boolean shadow, float brightnessMultiplier, float red, float green, float blue, float alpha, net.minecraft.client.font.TextRenderer.TextLayerType layerType, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, boolean isGlowy, int outlineColor, int usableColor)
      Creates an instance of a TextRenderingContext record class.
      Parameters:
      light - the value for the light record component
      shadow - the value for the shadow record component
      brightnessMultiplier - the value for the brightnessMultiplier record component
      red - the value for the red record component
      green - the value for the green record component
      blue - the value for the blue record component
      alpha - the value for the alpha record component
      layerType - the value for the layerType record component
      vertexConsumers - the value for the vertexConsumers record component
      isGlowy - the value for the isGlowy record component
      outlineColor - the value for the outlineColor record component
      usableColor - the value for the usableColor record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • light

      public int light()
      Returns the value of the light record component.
      Returns:
      the value of the light record component
    • shadow

      public boolean shadow()
      Returns the value of the shadow record component.
      Returns:
      the value of the shadow record component
    • brightnessMultiplier

      public float brightnessMultiplier()
      Returns the value of the brightnessMultiplier record component.
      Returns:
      the value of the brightnessMultiplier record component
    • red

      public float red()
      Returns the value of the red record component.
      Returns:
      the value of the red record component
    • green

      public float green()
      Returns the value of the green record component.
      Returns:
      the value of the green record component
    • blue

      public float blue()
      Returns the value of the blue record component.
      Returns:
      the value of the blue record component
    • alpha

      public float alpha()
      Returns the value of the alpha record component.
      Returns:
      the value of the alpha record component
    • layerType

      public net.minecraft.client.font.TextRenderer.TextLayerType layerType()
      Returns the value of the layerType record component.
      Returns:
      the value of the layerType record component
    • vertexConsumers

      public net.minecraft.client.render.VertexConsumerProvider vertexConsumers()
      Returns the value of the vertexConsumers record component.
      Returns:
      the value of the vertexConsumers record component
    • isGlowy

      public boolean isGlowy()
      Returns the value of the isGlowy record component.
      Returns:
      the value of the isGlowy record component
    • outlineColor

      public int outlineColor()
      Returns the value of the outlineColor record component.
      Returns:
      the value of the outlineColor record component
    • usableColor

      public int usableColor()
      Returns the value of the usableColor record component.
      Returns:
      the value of the usableColor record component