Skip to content

Class MinecraftPacketIdMapping

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

Associates a packet identifier with an inclusive protocol-version interval.

public record MinecraftPacketIdMapping : IEquatable<MinecraftPacketIdMapping>

Inheritance

objectMinecraftPacketIdMapping

Implements

IEquatable<MinecraftPacketIdMapping>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

MinecraftPacketIdMapping(int, ProtocolVersion, ProtocolVersion?)

Associates a packet identifier with an inclusive protocol-version interval.

public MinecraftPacketIdMapping(int Id, ProtocolVersion ProtocolVersion, ProtocolVersion? LastValidProtocolVersion = null)

Parameters

Id int

The numeric packet identifier.

ProtocolVersion ProtocolVersion

The first protocol version for which the identifier is valid.

LastValidProtocolVersion ProtocolVersion?

The optional final valid version; null lets registry construction infer the end from the next mapping or latest version.

Properties

Id

The numeric packet identifier.

public int Id { get; init; }

Property Value

int

LastValidProtocolVersion

The optional final valid version; null lets registry construction infer the end from the next mapping or latest version.

public ProtocolVersion? LastValidProtocolVersion { get; init; }

Property Value

ProtocolVersion?

ProtocolVersion

The first protocol version for which the identifier is valid.

public ProtocolVersion ProtocolVersion { get; init; }

Property Value

ProtocolVersion