Package net.minecraft.world.entity
Record Class Display.TextDisplay.TextRenderState
java.lang.Object
java.lang.Record
net.minecraft.world.entity.Display.TextDisplay.TextRenderState
- Enclosing class:
Display.TextDisplay
public static record Display.TextDisplay.TextRenderState(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Display.IntInterpolatorThe field for thebackgroundColorrecord component.private final byteThe field for theflagsrecord component.private final intThe field for thelineWidthrecord component.private final ComponentThe field for thetextrecord component.private final Display.IntInterpolatorThe field for thetextOpacityrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTextRenderState(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags) Creates an instance of aTextRenderStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundColorrecord component.final booleanIndicates whether some other object is "equal to" this one.byteflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thelineWidthrecord component.text()Returns the value of thetextrecord component.Returns the value of thetextOpacityrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
text
The field for thetextrecord component. -
lineWidth
private final int lineWidthThe field for thelineWidthrecord component. -
textOpacity
The field for thetextOpacityrecord component. -
backgroundColor
The field for thebackgroundColorrecord component. -
flags
private final byte flagsThe field for theflagsrecord component.
-
-
Constructor Details
-
TextRenderState
public TextRenderState(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags) Creates an instance of aTextRenderStaterecord class.- Parameters:
text- the value for thetextrecord componentlineWidth- the value for thelineWidthrecord componenttextOpacity- the value for thetextOpacityrecord componentbackgroundColor- the value for thebackgroundColorrecord componentflags- the value for theflagsrecord 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 '=='. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
lineWidth
public int lineWidth()Returns the value of thelineWidthrecord component.- Returns:
- the value of the
lineWidthrecord component
-
textOpacity
Returns the value of thetextOpacityrecord component.- Returns:
- the value of the
textOpacityrecord component
-
backgroundColor
Returns the value of thebackgroundColorrecord component.- Returns:
- the value of the
backgroundColorrecord component
-
flags
public byte flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-