Record Class TextFeatureRenderer.Content.Text
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.feature.TextFeatureRenderer.Content.Text
- All Implemented Interfaces:
TextFeatureRenderer.Content
- Enclosing interface:
TextFeatureRenderer.Content
public static record TextFeatureRenderer.Content.Text(float x, float y, FormattedCharSequence string, boolean dropShadow, int color, int backgroundColor, int outlineColor)
extends Record
implements TextFeatureRenderer.Content
-
Nested Class Summary
Nested classes/interfaces inherited from interface TextFeatureRenderer.Content
TextFeatureRenderer.Content.StandaloneBackground, TextFeatureRenderer.Content.Text -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebackgroundColorrecord component.private final intThe field for thecolorrecord component.private final booleanThe field for thedropShadowrecord component.private final intThe field for theoutlineColorrecord component.private final FormattedCharSequenceThe field for thestringrecord component.private final floatThe field for thexrecord component.private final floatThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionText(float x, float y, FormattedCharSequence string, boolean dropShadow, int color, int backgroundColor, int outlineColor) Creates an instance of aTextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebackgroundColorrecord component.intcolor()Returns the value of thecolorrecord component.booleanReturns the value of thedropShadowrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theoutlineColorrecord component.string()Returns the value of thestringrecord component.final StringtoString()Returns a string representation of this record class.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Field Details
-
x
private final float xThe field for thexrecord component. -
y
private final float yThe field for theyrecord component. -
string
The field for thestringrecord component. -
dropShadow
private final boolean dropShadowThe field for thedropShadowrecord component. -
color
private final int colorThe field for thecolorrecord component. -
backgroundColor
private final int backgroundColorThe field for thebackgroundColorrecord component. -
outlineColor
private final int outlineColorThe field for theoutlineColorrecord component.
-
-
Constructor Details
-
Text
public Text(float x, float y, FormattedCharSequence string, boolean dropShadow, int color, int backgroundColor, int outlineColor) Creates an instance of aTextrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentstring- the value for thestringrecord componentdropShadow- the value for thedropShadowrecord componentcolor- the value for thecolorrecord componentbackgroundColor- the value for thebackgroundColorrecord componentoutlineColor- the value for theoutlineColorrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
string
Returns the value of thestringrecord component.- Returns:
- the value of the
stringrecord component
-
dropShadow
public boolean dropShadow()Returns the value of thedropShadowrecord component.- Returns:
- the value of the
dropShadowrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
backgroundColor
public int backgroundColor()Returns the value of thebackgroundColorrecord component.- Returns:
- the value of the
backgroundColorrecord component
-
outlineColor
public int outlineColor()Returns the value of theoutlineColorrecord component.- Returns:
- the value of the
outlineColorrecord component
-