DisplayedRecipePacket
class
Declaration
[ProtocolSupport(751, 777)]
[Packet("play.toServer.displayed_recipe", PacketPhase.Play, PacketDirection.Serverbound)]
[PacketField("RecipeId", "string", Group = "V751_767", From = 751, To = 767)]
[PacketField("RecipeIdInt", "int", Group = "V768_Last", From = 768)]
public sealed record DisplayedRecipePacket : IPacket<DisplayedRecipePacket>, IProtocolType<DisplayedRecipePacket>, IPacket
| Namespace | McProtoNet.Protocol.Packets.Play.Serverbound |
| Assembly | McProtoNet.Protocol.dll |
| Source | src/McProtoNet.Protocol/Generated/Packets/Play/Serverbound/DisplayedRecipePacket.cs#L6 ↗ |
Implements: IPacket<DisplayedRecipePacket>, IProtocolType<DisplayedRecipePacket>, IPacket
Constructors
| Signature | Description |
|---|---|
DisplayedRecipePacket(DisplayedRecipePacket.V751_767Layer? V751_767 = null, DisplayedRecipePacket.V768_LastLayer? V768_Last = null) | - |
DisplayedRecipePacket(V751_767Layer?, V768_LastLayer?)
public DisplayedRecipePacket(DisplayedRecipePacket.V751_767Layer? V751_767 = null, DisplayedRecipePacket.V768_LastLayer? V768_Last = null)
Parameters: V751_767 (DisplayedRecipePacket.V751_767Layer?), V768_Last (DisplayedRecipePacket.V768_LastLayer?)
Properties
| Signature | Description |
|---|---|
static PacketIdentity Identity | Gets the identity of the packet type. |
DisplayedRecipePacket.V751_767Layer? V751_767 | - |
DisplayedRecipePacket.V768_LastLayer? V768_Last | - |
Identity
public static PacketIdentity Identity { get; }
Gets the identity of the packet type.
Returns: PacketIdentity
V751_767
public DisplayedRecipePacket.V751_767Layer? V751_767 { get; init; }
Returns: DisplayedRecipePacket.V751_767Layer?
V768_Last
public DisplayedRecipePacket.V768_LastLayer? V768_Last { get; init; }
Returns: DisplayedRecipePacket.V768_LastLayer?
Methods
| Signature | Description |
|---|---|
static int GetPacketId(int protocolVersion) | - |
static DisplayedRecipePacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion) | Reads a value of type DisplayedRecipePacket 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 DisplayedRecipePacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)
Reads a value of type DisplayedRecipePacket from the specified reader.
Parameters: reader (MinecraftPrimitiveReader), protocolVersion (int)
Returns: DisplayedRecipePacket - 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)