ScoreboardScorePacket
class
Declaration
[ProtocolSupport(735, 777)]
[Packet("play.toClient.scoreboard_score", PacketPhase.Play, PacketDirection.Clientbound)]
[PacketField("EntityName", "string")]
[PacketField("ObjectiveName", "string")]
[PacketField("Value", "int?")]
[PacketField("Action", "int", Group = "VUntil764", To = 764)]
[PacketField("DisplayName", "NbtTag?", Group = "V765_Last", From = 765)]
[PacketField("NumberFormat", "int?", Group = "V765_Last", From = 765)]
[PacketField("Styling", "NbtTag?", Group = "V765_Last", From = 765)]
public sealed record ScoreboardScorePacket : IPacket<ScoreboardScorePacket>, IProtocolType<ScoreboardScorePacket>, IPacket
| Namespace | McProtoNet.Protocol.Packets.Play.Clientbound |
| Assembly | McProtoNet.Protocol.dll |
| Source | src/McProtoNet.Protocol/Generated/Packets/Play/Clientbound/ScoreboardScorePacket.cs#L7 ↗ |
Implements: IPacket<ScoreboardScorePacket>, IProtocolType<ScoreboardScorePacket>, IPacket
Constructors
ScoreboardScorePacket(string, string, int?, VUntil764Layer?, V765_LastLayer?)
public ScoreboardScorePacket(string EntityName, string ObjectiveName, int? Value, ScoreboardScorePacket.VUntil764Layer? VUntil764 = null, ScoreboardScorePacket.V765_LastLayer? V765_Last = null)
Parameters: EntityName (string), ObjectiveName (string), Value (int?), VUntil764 (ScoreboardScorePacket.VUntil764Layer?), V765_Last (ScoreboardScorePacket.V765_LastLayer?)
Properties
| Signature | Description |
|---|---|
string EntityName | - |
static PacketIdentity Identity | Gets the identity of the packet type. |
string ObjectiveName | - |
ScoreboardScorePacket.V765_LastLayer? V765_Last | - |
ScoreboardScorePacket.VUntil764Layer? VUntil764 | - |
int? Value | - |
EntityName
public string EntityName { get; init; }
Returns: string
Identity
public static PacketIdentity Identity { get; }
Gets the identity of the packet type.
Returns: PacketIdentity
ObjectiveName
public string ObjectiveName { get; init; }
Returns: string
V765_Last
public ScoreboardScorePacket.V765_LastLayer? V765_Last { get; init; }
Returns: ScoreboardScorePacket.V765_LastLayer?
VUntil764
public ScoreboardScorePacket.VUntil764Layer? VUntil764 { get; init; }
Returns: ScoreboardScorePacket.VUntil764Layer?
Value
public int? Value { get; init; }
Returns: int?
Methods
| Signature | Description |
|---|---|
static int GetPacketId(int protocolVersion) | - |
static ScoreboardScorePacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion) | Reads a value of type ScoreboardScorePacket from the specified reader. |
static bool TryGetPacketId(int protocolVersion, out int id) | Attempts to get the wire id of the packet for the specified protocol version. |
void Write(MinecraftPrimitiveWriter writer, int protocolVersion) | Writes the current value to the specified writer. |
GetPacketId(int)
public static int GetPacketId(int protocolVersion)
Parameters: protocolVersion (int)
Returns: int
Read(ref MinecraftPrimitiveReader, int)
public static ScoreboardScorePacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)
Reads a value of type ScoreboardScorePacket from the specified reader.
Parameters: reader (MinecraftPrimitiveReader), protocolVersion (int)
Returns: ScoreboardScorePacket - The value that was read.
TryGetPacketId(int, out int)
public static bool TryGetPacketId(int protocolVersion, out int id)
Attempts to get the wire id of the packet for the specified protocol version.
Parameters: protocolVersion (int), id (int)
Returns: bool - true if the packet exists on the specified protocol version; otherwise, false.
Write(MinecraftPrimitiveWriter, int)
public void Write(MinecraftPrimitiveWriter writer, int protocolVersion)
Writes the current value to the specified writer.
Parameters: writer (MinecraftPrimitiveWriter), protocolVersion (int)