Package net.minecraft.world.scores
Record Class Scoreboard.PackedScore
java.lang.Object
java.lang.Record
net.minecraft.world.scores.Scoreboard.PackedScore
- Enclosing class:
Scoreboard
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Scoreboard.PackedScore> private final StringThe field for theobjectiverecord component.private final StringThe field for theownerrecord component.private final ScoreThe field for thescorerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPackedScore(String owner, String objective, Score score) Creates an instance of aPackedScorerecord 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.Returns the value of theobjectiverecord component.owner()Returns the value of theownerrecord component.score()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
owner
The field for theownerrecord component. -
objective
The field for theobjectiverecord component. -
score
The field for thescorerecord component. -
CODEC
-
-
Constructor Details
-
PackedScore
Creates an instance of aPackedScorerecord class.- Parameters:
owner- the value for theownerrecord componentobjective- the value for theobjectiverecord componentscore- the value for thescorerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
objective
Returns the value of theobjectiverecord component.- Returns:
- the value of the
objectiverecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-