Record Class PlayerTabOverlay.ScoreDisplayEntry
java.lang.Object
java.lang.Record
net.minecraft.client.gui.components.PlayerTabOverlay.ScoreDisplayEntry
- Enclosing class:
- PlayerTabOverlay
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ComponentThe field for theformattedScorerecord component.private final ComponentThe field for thenamerecord component.private final intThe field for thescorerecord component.private final intThe field for thescoreWidthrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionScoreDisplayEntry(Component name, int score, Component formattedScore, int scoreWidth) Creates an instance of aScoreDisplayEntryrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theformattedScorerecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.intscore()Returns the value of thescorerecord component.intReturns the value of thescoreWidthrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
nameThe field for thenamerecord component.
- 
scoreprivate final int scoreThe field for thescorerecord component.
- 
formattedScoreThe field for theformattedScorerecord component.
- 
scoreWidthprivate final int scoreWidthThe field for thescoreWidthrecord component.
 
- 
- 
Constructor Details- 
ScoreDisplayEntryCreates an instance of aScoreDisplayEntryrecord class.- Parameters:
- name- the value for the- namerecord component
- score- the value for the- scorerecord component
- formattedScore- the value for the- formattedScorerecord component
- scoreWidth- the value for the- scoreWidthrecord 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 '=='.
- 
nameReturns the value of thenamerecord component.- Returns:
- the value of the namerecord component
 
- 
scorepublic int score()Returns the value of thescorerecord component.- Returns:
- the value of the scorerecord component
 
- 
formattedScoreReturns the value of theformattedScorerecord component.- Returns:
- the value of the formattedScorerecord component
 
- 
scoreWidthpublic int scoreWidth()Returns the value of thescoreWidthrecord component.- Returns:
- the value of the scoreWidthrecord component
 
 
-