ResourcePackSendPacket
class
Declaration
[ProtocolSupport(735, 764)]
[Packet("play.toClient.resource_pack_send", PacketPhase.Play, PacketDirection.Clientbound)]
[PacketField("Url", "string")]
[PacketField("Hash", "string")]
[PacketField("Forced", "bool", Group = "V755_764", From = 755, To = 764)]
[PacketField("PromptMessage", "string?", Group = "V755_764", From = 755, To = 764)]
public sealed record ResourcePackSendPacket : IPacket<ResourcePackSendPacket>, IProtocolType<ResourcePackSendPacket>, IPacket
| Namespace | McProtoNet.Protocol.Packets.Play.Clientbound |
| Assembly | McProtoNet.Protocol.dll |
| Source | src/McProtoNet.Protocol/Generated/Packets/Play/Clientbound/ResourcePackSendPacket.cs#L5 ↗ |
Implements: IPacket<ResourcePackSendPacket>, IProtocolType<ResourcePackSendPacket>, IPacket
Constructors
| Signature | Description |
|---|---|
ResourcePackSendPacket(string Url, string Hash, ResourcePackSendPacket.V755_764Layer? V755_764 = null) | - |
ResourcePackSendPacket(string, string, V755_764Layer?)
public ResourcePackSendPacket(string Url, string Hash, ResourcePackSendPacket.V755_764Layer? V755_764 = null)
Parameters: Url (String), Hash (String), V755_764 (Nullable<V755_764Layer>)
Properties
| Signature | Description |
|---|---|
string Hash | - |
static PacketIdentity Identity | Gets the identity of the packet type. |
string Url | - |
ResourcePackSendPacket.V755_764Layer? V755_764 | - |
Hash
public string Hash { get; init; }
Returns: String
Identity
public static PacketIdentity Identity { get; }
Gets the identity of the packet type.
Returns: PacketIdentity
Url
public string Url { get; init; }
Returns: String
V755_764
public ResourcePackSendPacket.V755_764Layer? V755_764 { get; init; }
Returns: Nullable<V755_764Layer>
Methods
| Signature | Description |
|---|---|
static int GetPacketId(int protocolVersion) | - |
static ResourcePackSendPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion) | Reads a value of type ResourcePackSendPacket 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 ResourcePackSendPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)
Reads a value of type ResourcePackSendPacket from the specified reader.
Parameters: reader (MinecraftPrimitiveReader), protocolVersion (Int32)
Returns: ResourcePackSendPacket - 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)