From 040aa51ed782b59cdcf50cf1196be6094b23c417 Mon Sep 17 00:00:00 2001 From: Vitalii Kotenko Date: Sun, 29 Sep 2024 01:57:49 +0300 Subject: [PATCH] fill mappings for 1.20.2->latest protocol plugin --- .../v1_20_2_to_latest/Registries/Mappings.cs | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Plugins/ProtocolSupport/Java/v1_20_2_to_latest/Registries/Mappings.cs b/src/Plugins/ProtocolSupport/Java/v1_20_2_to_latest/Registries/Mappings.cs index 08eed9d..39406e3 100644 --- a/src/Plugins/ProtocolSupport/Java/v1_20_2_to_latest/Registries/Mappings.cs +++ b/src/Plugins/ProtocolSupport/Java/v1_20_2_to_latest/Registries/Mappings.cs @@ -11,36 +11,40 @@ public static class Mappings public static readonly IReadOnlyDictionary ServerboundHandshakeMappings = new Dictionary { - { [new PacketMapping(0x00, ProtocolVersion.MINECRAFT_1_7_2)], typeof(HandshakePacket) } + { [new PacketMapping(0x00, Plugin.SupportedVersions.First())], typeof(HandshakePacket) } }; public static readonly IReadOnlyDictionary ClientboundLoginMappings = new Dictionary { - { [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 ServerboundLoginMappings = new Dictionary { - { [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 ClientboundConfigurationMappings = new Dictionary { - { [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 ServerboundConfigurationMappings = new Dictionary(); public static readonly IReadOnlyDictionary ClientboundPlayMappings = new Dictionary { - { [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 ServerboundPlayMappings = new Dictionary { - { [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()