UpdateTimePacket
class
Declaration
[ProtocolSupport(735, 776)]
[Packet("play.toClient.update_time", PacketPhase.Play, PacketDirection.Clientbound)]
[PacketField("Age", "long")]
[PacketField("Time", "long", Group = "VUntil767", To = 767)]
[PacketField("Time", "long", Group = "V768_774", From = 768, To = 774)]
[PacketField("TickDayTime", "bool", Group = "V768_774", From = 768, To = 774)]
[PacketField("ClockUpdates", "ClockUpdate[]", Group = "V775_Last", From = 775)]
public sealed record UpdateTimePacket : IPacket<UpdateTimePacket>, IProtocolType<UpdateTimePacket>, IPacket
| Namespace | McProtoNet.Protocol.Packets.Play.Clientbound |
| Assembly | McProtoNet.Protocol.dll |
| Source | src/McProtoNet.Protocol/Generated/Packets/Play/Clientbound/UpdateTimePacket.cs#L5 ↗ |
Implements: IPacket<UpdateTimePacket>, IProtocolType<UpdateTimePacket>, IPacket
Constructors
| Signature | Description |
|---|---|
UpdateTimePacket(long Age, UpdateTimePacket.VUntil767Layer? VUntil767 = null, UpdateTimePacket.V768_774Layer? V768_774 = null, UpdateTimePacket.V775_LastLayer? V775_Last = null) | - |
UpdateTimePacket(long, VUntil767Layer?, V768_774Layer?, V775_LastLayer?)
public UpdateTimePacket(long Age, UpdateTimePacket.VUntil767Layer? VUntil767 = null, UpdateTimePacket.V768_774Layer? V768_774 = null, UpdateTimePacket.V775_LastLayer? V775_Last = null)
Parameters: Age (Int64), VUntil767 (Nullable<VUntil767Layer>), V768_774 (Nullable<V768_774Layer>), V775_Last (Nullable<V775_LastLayer>)
Properties
| Signature | Description |
|---|---|
long Age | - |
static PacketIdentity Identity | Gets the identity of the packet type. |
UpdateTimePacket.V768_774Layer? V768_774 | - |
UpdateTimePacket.V775_LastLayer? V775_Last | - |
UpdateTimePacket.VUntil767Layer? VUntil767 | - |
Age
public long Age { get; init; }
Returns: Int64
Identity
public static PacketIdentity Identity { get; }
Gets the identity of the packet type.
Returns: PacketIdentity
V768_774
public UpdateTimePacket.V768_774Layer? V768_774 { get; init; }
Returns: Nullable<V768_774Layer>
V775_Last
public UpdateTimePacket.V775_LastLayer? V775_Last { get; init; }
Returns: Nullable<V775_LastLayer>
VUntil767
public UpdateTimePacket.VUntil767Layer? VUntil767 { get; init; }
Returns: Nullable<VUntil767Layer>
Methods
| Signature | Description |
|---|---|
static int GetPacketId(int protocolVersion) | - |
static UpdateTimePacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion) | Reads a value of type UpdateTimePacket 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 (Int32)
Returns: Int32
Read(ref MinecraftPrimitiveReader, int)
public static UpdateTimePacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)
Reads a value of type UpdateTimePacket from the specified reader.
Parameters: reader (MinecraftPrimitiveReader), protocolVersion (Int32)
Returns: UpdateTimePacket - 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 (Int32), id (Int32)
Returns: Boolean - <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the packet exists on the specified protocol version; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.
Write(MinecraftPrimitiveWriter, int)
public void Write(MinecraftPrimitiveWriter writer, int protocolVersion)
Writes the current value to the specified writer.
Parameters: writer (MinecraftPrimitiveWriter), protocolVersion (Int32)