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
Modifier and TypeFieldDescriptionprivate final Display.IntInterpolator
The field for thebackgroundColor
record component.private final byte
The field for theflags
record component.private final int
The field for thelineWidth
record component.private final Component
The field for thetext
record component.private final Display.IntInterpolator
The field for thetextOpacity
record component. -
Constructor Summary
ConstructorDescriptionTextRenderState
(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags) Creates an instance of aTextRenderState
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundColor
record component.final boolean
Indicates whether some other object is "equal to" this one.byte
flags()
Returns the value of theflags
record component.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thelineWidth
record component.text()
Returns the value of thetext
record component.Returns the value of thetextOpacity
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
text
The field for thetext
record component. -
lineWidth
private final int lineWidthThe field for thelineWidth
record component. -
textOpacity
The field for thetextOpacity
record component. -
backgroundColor
The field for thebackgroundColor
record component. -
flags
private final byte flagsThe field for theflags
record component.
-
-
Constructor Details
-
TextRenderState
public TextRenderState(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags) Creates an instance of aTextRenderState
record class.- Parameters:
text
- the value for thetext
record componentlineWidth
- the value for thelineWidth
record componenttextOpacity
- the value for thetextOpacity
record componentbackgroundColor
- the value for thebackgroundColor
record componentflags
- the value for theflags
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 '=='. -
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
lineWidth
public int lineWidth()Returns the value of thelineWidth
record component.- Returns:
- the value of the
lineWidth
record component
-
textOpacity
Returns the value of thetextOpacity
record component.- Returns:
- the value of the
textOpacity
record component
-
backgroundColor
Returns the value of thebackgroundColor
record component.- Returns:
- the value of the
backgroundColor
record component
-
flags
public byte flags()Returns the value of theflags
record component.- Returns:
- the value of the
flags
record component
-