Record Class PlayerTabOverlay.ScoreDisplayEntry
java.lang.Object
java.lang.Record
net.minecraft.client.gui.components.PlayerTabOverlay.ScoreDisplayEntry
- Enclosing class:
PlayerTabOverlay
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable 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 Summary
ConstructorsModifierConstructorDescriptionprivateScoreDisplayEntry(Component name, int score, @Nullable Component formattedScore, int scoreWidth) Creates an instance of aScoreDisplayEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable ComponentReturns 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
-
name
The field for thenamerecord component. -
score
private final int scoreThe field for thescorerecord component. -
formattedScore
The field for theformattedScorerecord component. -
scoreWidth
private final int scoreWidthThe field for thescoreWidthrecord component.
-
-
Constructor Details
-
ScoreDisplayEntry
private ScoreDisplayEntry(Component name, int score, @Nullable Component formattedScore, int scoreWidth) Creates an instance of aScoreDisplayEntryrecord class.- Parameters:
name- the value for thenamerecord componentscore- the value for thescorerecord componentformattedScore- the value for theformattedScorerecord componentscoreWidth- the value for thescoreWidthrecord 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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
score
public int score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
formattedScore
Returns the value of theformattedScorerecord component.- Returns:
- the value of the
formattedScorerecord component
-
scoreWidth
public int scoreWidth()Returns the value of thescoreWidthrecord component.- Returns:
- the value of the
scoreWidthrecord component
-