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 aTextRenderingContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatalpha()Returns the value of thealpharecord component.floatblue()Returns the value of thebluerecord component.floatReturns the value of thebrightnessMultiplierrecord component.final booleanIndicates whether some other object is "equal to" this one.floatgreen()Returns the value of thegreenrecord component.final inthashCode()Returns a hash code value for this object.booleanisGlowy()Returns the value of theisGlowyrecord component.net.minecraft.client.font.TextRenderer.TextLayerTypeReturns the value of thelayerTyperecord component.intlight()Returns the value of thelightrecord component.intReturns the value of theoutlineColorrecord component.floatred()Returns the value of theredrecord component.booleanshadow()Returns the value of theshadowrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theusableColorrecord component.net.minecraft.client.render.VertexConsumerProviderReturns the value of thevertexConsumersrecord 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 aTextRenderingContextrecord class.- Parameters:
light- the value for thelightrecord componentshadow- the value for theshadowrecord componentbrightnessMultiplier- the value for thebrightnessMultiplierrecord componentred- the value for theredrecord componentgreen- the value for thegreenrecord componentblue- the value for thebluerecord componentalpha- the value for thealpharecord componentlayerType- the value for thelayerTyperecord componentvertexConsumers- the value for thevertexConsumersrecord componentisGlowy- the value for theisGlowyrecord componentoutlineColor- the value for theoutlineColorrecord componentusableColor- the value for theusableColorrecord 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 thelightrecord component.- Returns:
- the value of the
lightrecord component
-
shadow
public boolean shadow()Returns the value of theshadowrecord component.- Returns:
- the value of the
shadowrecord component
-
brightnessMultiplier
public float brightnessMultiplier()Returns the value of thebrightnessMultiplierrecord component.- Returns:
- the value of the
brightnessMultiplierrecord component
-
red
public float red()Returns the value of theredrecord component.- Returns:
- the value of the
redrecord component
-
green
public float green()Returns the value of thegreenrecord component.- Returns:
- the value of the
greenrecord component
-
blue
public float blue()Returns the value of thebluerecord component.- Returns:
- the value of the
bluerecord component
-
alpha
public float alpha()Returns the value of thealpharecord component.- Returns:
- the value of the
alpharecord component
-
layerType
public net.minecraft.client.font.TextRenderer.TextLayerType layerType()Returns the value of thelayerTyperecord component.- Returns:
- the value of the
layerTyperecord component
-
vertexConsumers
public net.minecraft.client.render.VertexConsumerProvider vertexConsumers()Returns the value of thevertexConsumersrecord component.- Returns:
- the value of the
vertexConsumersrecord component
-
isGlowy
public boolean isGlowy()Returns the value of theisGlowyrecord component.- Returns:
- the value of the
isGlowyrecord component
-
outlineColor
public int outlineColor()Returns the value of theoutlineColorrecord component.- Returns:
- the value of the
outlineColorrecord component
-
usableColor
public int usableColor()Returns the value of theusableColorrecord component.- Returns:
- the value of the
usableColorrecord component
-