Record Class ScoreboardScoreUpdateS2CPacket
java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.play.ScoreboardScoreUpdateS2CPacket
- Record Components:
scoreHolderName-objectiveName-score-display-numberFormat-
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public record ScoreboardScoreUpdateS2CPacket(String scoreHolderName, String objectiveName, int score, Optional<Text> display, Optional<NumberFormat> numberFormat)
extends Record
implements Packet<ClientPlayPacketListener>
- Mappings:
Namespace Name named net/minecraft/network/packet/s2c/play/ScoreboardScoreUpdateS2CPacketintermediary net/minecraft/class_2757official afinamed scoreHolderNameintermediary comp_2122official bnamed objectiveNameintermediary comp_2123official cnamed scoreintermediary comp_2124official dnamed displayintermediary comp_2125official enamed numberFormatintermediary comp_2126official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec<RegistryByteBuf, ScoreboardScoreUpdateS2CPacket> The field for thedisplayrecord component.private final Optional<NumberFormat> The field for thenumberFormatrecord component.private final StringThe field for theobjectiveNamerecord component.private final intThe field for thescorerecord component.private final StringThe field for thescoreHolderNamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionScoreboardScoreUpdateS2CPacket(String string, String string2, int int2, Optional<Text> optional, Optional<NumberFormat> optional2) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ClientPlayPacketListener clientPlayPacketListener) display()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenumberFormatrecord component.Returns the value of theobjectiveNamerecord component.intscore()Returns the value of thescorerecord component.Returns the value of thescoreHolderNamerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable, transitionsNetworkState
-
Field Details
-
scoreHolderName
The field for thescoreHolderNamerecord component. -
objectiveName
The field for theobjectiveNamerecord component. -
score
private final int scoreThe field for thescorerecord component. -
display
The field for thedisplayrecord component. -
numberFormat
The field for thenumberFormatrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/packet/s2c/play/ScoreboardScoreUpdateS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_47988Lnet/minecraft/class_2757;field_47988:Lnet/minecraft/class_9139;official aLafi;a:Lyx;
-
-
Constructor Details
-
ScoreboardScoreUpdateS2CPacket
-
-
Method Details
-
getPacketId
- Specified by:
getPacketIdin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named getPacketIdLnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;intermediary method_55846Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;official aLzg;a()Lzi;
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/network/packet/s2c/play/ScoreboardScoreUpdateS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)Vintermediary method_11866Lnet/minecraft/class_2757;method_11866(Lnet/minecraft/class_2602;)Vofficial aLafi;a(Labu;)V
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
scoreHolderName
Returns the value of thescoreHolderNamerecord component.- Returns:
- the value of the
scoreHolderNamerecord component
-
objectiveName
Returns the value of theobjectiveNamerecord component.- Returns:
- the value of the
objectiveNamerecord component
-
score
public int score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
numberFormat
Returns the value of thenumberFormatrecord component.- Returns:
- the value of the
numberFormatrecord component
-