Skip to content

Interface IMinecraftPacketIdRegistry

Namespace: Void.Minecraft.Network.Registries.PacketId
Assembly: Void.Minecraft.dll

public interface IMinecraftPacketIdRegistry

Extension Methods

MinecraftPacketIdRegistryExtensions.RegisterPacket<T>(IMinecraftPacketIdRegistry, ProtocolVersion, params MinecraftPacketIdMapping[])

Properties

IsEmpty

bool IsEmpty { get; }

Property Value

bool

PacketTypes

IEnumerable<Type> PacketTypes { get; }

Property Value

IEnumerable<Type>

Methods

AddPackets(IReadOnlyDictionary<MinecraftPacketIdMapping[], Type>, ProtocolVersion)

IMinecraftPacketIdRegistry AddPackets(IReadOnlyDictionary<MinecraftPacketIdMapping[], Type> mappings, ProtocolVersion protocolVersion)

Parameters

mappings IReadOnlyDictionary<MinecraftPacketIdMapping[], Type>

protocolVersion ProtocolVersion

Returns

IMinecraftPacketIdRegistry

Clear()

void Clear()

Clear(Direction)

void Clear(Direction direction)

Parameters

direction Direction

Contains<T>()

bool Contains<T>() where T : IMinecraftPacket

Returns

bool

Type Parameters

T

Contains(INetworkMessage)

bool Contains(INetworkMessage message)

Parameters

message INetworkMessage

Returns

bool

Contains(Type)

bool Contains(Type type)

Parameters

type Type

Returns

bool

ReplacePackets(IReadOnlyDictionary<MinecraftPacketIdMapping[], Type>, ProtocolVersion)

IMinecraftPacketIdRegistry ReplacePackets(IReadOnlyDictionary<MinecraftPacketIdMapping[], Type> mappings, ProtocolVersion protocolVersion)

Parameters

mappings IReadOnlyDictionary<MinecraftPacketIdMapping[], Type>

protocolVersion ProtocolVersion

Returns

IMinecraftPacketIdRegistry

TryCreateDecoder(int, out MinecraftPacketDecoder<IMinecraftPacket>)

bool TryCreateDecoder(int id, out MinecraftPacketDecoder<IMinecraftPacket> packet)

Parameters

id int

packet MinecraftPacketDecoder<IMinecraftPacket>

Returns

bool

TryCreateDecoder(int, out Type, out MinecraftPacketDecoder<IMinecraftPacket>)

bool TryCreateDecoder(int id, out Type packetType, out MinecraftPacketDecoder<IMinecraftPacket> packet)

Parameters

id int

packetType Type

packet MinecraftPacketDecoder<IMinecraftPacket>

Returns

bool

TryGetPacketId(IMinecraftPacket, out int)

bool TryGetPacketId(IMinecraftPacket packet, out int id)

Parameters

packet IMinecraftPacket

id int

Returns

bool

TryGetType(int, out Type)

bool TryGetType(int id, out Type packetType)

Parameters

id int

packetType Type

Returns

bool