Skip to content

Interface IMinecraftPacket<TSelf>

Namespace: Void.Minecraft.Network.Messages.Packets
Assembly: Void.Minecraft.dll

Defines a Minecraft packet type that can decode its payload from a buffer.

public interface IMinecraftPacket<out TSelf> : IMinecraftPacket, IMinecraftMessage, INetworkMessage, IDisposable where TSelf : IMinecraftPacket

Type Parameters

TSelf

The concrete packet type produced by decoding.

Implements

IMinecraftPacket, IMinecraftMessage, INetworkMessage, IDisposable

Methods

Decode(ref MinecraftBuffer, ProtocolVersion)

Decodes a packet payload at the buffer’s current position.

public static abstract TSelf Decode(ref MinecraftBuffer buffer, ProtocolVersion protocolVersion)

Parameters

buffer MinecraftBuffer

The source packet buffer.

protocolVersion ProtocolVersion

The protocol version whose wire layout is used.

Returns

TSelf

The decoded packet instance.