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
ConstructorsConstructorDescriptionTextRenderingContext
(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 aTextRenderingContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
alpha()
Returns the value of thealpha
record component.float
blue()
Returns the value of theblue
record component.float
Returns the value of thebrightnessMultiplier
record component.final boolean
Indicates whether some other object is "equal to" this one.float
green()
Returns the value of thegreen
record component.final int
hashCode()
Returns a hash code value for this object.boolean
isGlowy()
Returns the value of theisGlowy
record component.net.minecraft.client.font.TextRenderer.TextLayerType
Returns the value of thelayerType
record component.int
light()
Returns the value of thelight
record component.int
Returns the value of theoutlineColor
record component.float
red()
Returns the value of thered
record component.boolean
shadow()
Returns the value of theshadow
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of theusableColor
record component.net.minecraft.client.render.VertexConsumerProvider
Returns the value of thevertexConsumers
record component.
-
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 aTextRenderingContext
record class.- Parameters:
light
- the value for thelight
record componentshadow
- the value for theshadow
record componentbrightnessMultiplier
- the value for thebrightnessMultiplier
record componentred
- the value for thered
record componentgreen
- the value for thegreen
record componentblue
- the value for theblue
record componentalpha
- the value for thealpha
record componentlayerType
- the value for thelayerType
record componentvertexConsumers
- the value for thevertexConsumers
record componentisGlowy
- the value for theisGlowy
record componentoutlineColor
- the value for theoutlineColor
record componentusableColor
- the value for theusableColor
record component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
light
public int light()Returns the value of thelight
record component.- Returns:
- the value of the
light
record component
-
shadow
public boolean shadow()Returns the value of theshadow
record component.- Returns:
- the value of the
shadow
record component
-
brightnessMultiplier
public float brightnessMultiplier()Returns the value of thebrightnessMultiplier
record component.- Returns:
- the value of the
brightnessMultiplier
record component
-
red
public float red()Returns the value of thered
record component.- Returns:
- the value of the
red
record component
-
green
public float green()Returns the value of thegreen
record component.- Returns:
- the value of the
green
record component
-
blue
public float blue()Returns the value of theblue
record component.- Returns:
- the value of the
blue
record component
-
alpha
public float alpha()Returns the value of thealpha
record component.- Returns:
- the value of the
alpha
record component
-
layerType
public net.minecraft.client.font.TextRenderer.TextLayerType layerType()Returns the value of thelayerType
record component.- Returns:
- the value of the
layerType
record component
-
vertexConsumers
public net.minecraft.client.render.VertexConsumerProvider vertexConsumers()Returns the value of thevertexConsumers
record component.- Returns:
- the value of the
vertexConsumers
record component
-
isGlowy
public boolean isGlowy()Returns the value of theisGlowy
record component.- Returns:
- the value of the
isGlowy
record component
-
outlineColor
public int outlineColor()Returns the value of theoutlineColor
record component.- Returns:
- the value of the
outlineColor
record component
-
usableColor
public int usableColor()Returns the value of theusableColor
record component.- Returns:
- the value of the
usableColor
record component
-