Record Class Display.TextDisplay.CachedInfo
java.lang.Object
java.lang.Record
net.minecraft.world.entity.Display.TextDisplay.CachedInfo
- Enclosing class:
Display.TextDisplay
public static record Display.TextDisplay.CachedInfo(List<Display.TextDisplay.CachedLine> lines, int width)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<Display.TextDisplay.CachedLine> The field for thelinesrecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCachedInfo(List<Display.TextDisplay.CachedLine> lines, int width) Creates an instance of aCachedInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lines()Returns the value of thelinesrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
lines
The field for thelinesrecord component. -
width
private final int widthThe field for thewidthrecord component.
-
-
Constructor Details
-
CachedInfo
Creates an instance of aCachedInforecord class.- Parameters:
lines- the value for thelinesrecord componentwidth- the value for thewidthrecord 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. -
lines
Returns the value of thelinesrecord component.- Returns:
- the value of the
linesrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-