Skip to content

Commit

Permalink
fill mappings for 1.20.2->latest protocol plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
caunt committed Sep 28, 2024
1 parent b823e44 commit 040aa51
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,40 @@ public static class Mappings

public static readonly IReadOnlyDictionary<PacketMapping[], Type> ServerboundHandshakeMappings = new Dictionary<PacketMapping[], Type>
{
{ [new PacketMapping(0x00, ProtocolVersion.MINECRAFT_1_7_2)], typeof(HandshakePacket) }
{ [new PacketMapping(0x00, Plugin.SupportedVersions.First())], typeof(HandshakePacket) }
};

public static readonly IReadOnlyDictionary<PacketMapping[], Type> ClientboundLoginMappings = new Dictionary<PacketMapping[], Type>
{
{ [new PacketMapping(0x01, ProtocolVersion.MINECRAFT_1_7_2)], typeof(EncryptionRequestPacket) },
{ [new PacketMapping(0x03, ProtocolVersion.MINECRAFT_1_8)], typeof(SetCompressionPacket) }
{ [new PacketMapping(0x01, Plugin.SupportedVersions.First())], typeof(EncryptionRequestPacket) },
{ [new PacketMapping(0x03, Plugin.SupportedVersions.First())], typeof(SetCompressionPacket) }
};

public static readonly IReadOnlyDictionary<PacketMapping[], Type> ServerboundLoginMappings = new Dictionary<PacketMapping[], Type>
{
{ [new PacketMapping(0x01, ProtocolVersion.MINECRAFT_1_7_2)], typeof(EncryptionResponsePacket) },
{ [new PacketMapping(0x03, ProtocolVersion.MINECRAFT_1_20_2)], typeof(LoginAcknowledgedPacket) }
{ [new PacketMapping(0x01, Plugin.SupportedVersions.First())], typeof(EncryptionResponsePacket) },
{ [new PacketMapping(0x03, Plugin.SupportedVersions.First())], typeof(LoginAcknowledgedPacket) }
};

public static readonly IReadOnlyDictionary<PacketMapping[], Type> ClientboundConfigurationMappings = new Dictionary<PacketMapping[], Type>
{
{ [new PacketMapping(0x03, ProtocolVersion.MINECRAFT_1_21)], typeof(FinishConfigurationPacket) }
{ [new PacketMapping(0x02, Plugin.SupportedVersions.First(), ProtocolVersion.MINECRAFT_1_20_3)], typeof(FinishConfigurationPacket) },
{ [new PacketMapping(0x03, ProtocolVersion.MINECRAFT_1_20_5)], typeof(FinishConfigurationPacket) }
};

public static readonly IReadOnlyDictionary<PacketMapping[], Type> ServerboundConfigurationMappings = new Dictionary<PacketMapping[], Type>();

public static readonly IReadOnlyDictionary<PacketMapping[], Type> ClientboundPlayMappings = new Dictionary<PacketMapping[], Type>
{
{ [new PacketMapping(0x26, ProtocolVersion.MINECRAFT_1_21)], typeof(KeepAliveRequestPacket) }
{ [new PacketMapping(0x24, Plugin.SupportedVersions.First(), ProtocolVersion.MINECRAFT_1_20_3)], typeof(KeepAliveRequestPacket) },
{ [new PacketMapping(0x26, ProtocolVersion.MINECRAFT_1_20_5)], typeof(KeepAliveRequestPacket) }
};

public static readonly IReadOnlyDictionary<PacketMapping[], Type> ServerboundPlayMappings = new Dictionary<PacketMapping[], Type>
{
{ [new PacketMapping(0x18, ProtocolVersion.MINECRAFT_1_21)], typeof(KeepAliveResponsePacket) }
{ [new PacketMapping(0x14, Plugin.SupportedVersions.First(), ProtocolVersion.MINECRAFT_1_20_2)], typeof(KeepAliveResponsePacket) },
{ [new PacketMapping(0x15, ProtocolVersion.MINECRAFT_1_20_3, ProtocolVersion.MINECRAFT_1_20_3)], typeof(KeepAliveResponsePacket) },
{ [new PacketMapping(0x18, ProtocolVersion.MINECRAFT_1_20_5)], typeof(KeepAliveResponsePacket) },
};

public static void Fill()
Expand Down

0 comments on commit 040aa51

Please sign in to comment.