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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionTextRenderState(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags) Creates an instance of aTextRenderStaterecord class.
- 
Method SummaryModifier 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- 
textThe field for thetextrecord component.
- 
lineWidthprivate final int lineWidthThe field for thelineWidthrecord component.
- 
textOpacityThe field for thetextOpacityrecord component.
- 
backgroundColorThe field for thebackgroundColorrecord component.
- 
flagsprivate final byte flagsThe field for theflagsrecord component.
 
- 
- 
Constructor Details- 
TextRenderStatepublic TextRenderState(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags) Creates an instance of aTextRenderStaterecord class.- Parameters:
- text- the value for the- textrecord component
- lineWidth- the value for the- lineWidthrecord component
- textOpacity- the value for the- textOpacityrecord component
- backgroundColor- the value for the- backgroundColorrecord component
- flags- the value for the- flagsrecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
textReturns the value of thetextrecord component.- Returns:
- the value of the textrecord component
 
- 
lineWidthpublic int lineWidth()Returns the value of thelineWidthrecord component.- Returns:
- the value of the lineWidthrecord component
 
- 
textOpacityReturns the value of thetextOpacityrecord component.- Returns:
- the value of the textOpacityrecord component
 
- 
backgroundColorReturns the value of thebackgroundColorrecord component.- Returns:
- the value of the backgroundColorrecord component
 
- 
flagspublic byte flags()Returns the value of theflagsrecord component.- Returns:
- the value of the flagsrecord component
 
 
-