Minecraft-Console-Client/MinecraftClient/Protocol/Handlers
BruceChen a7a95d991c Fix EntityProperties attribute ID mapping for 1.20.6
The 1.20.6 EntityProperties packet sends attribute IDs as VarInts
instead of strings. The existing mapping dictionary had three issues:

1. IDs 5/6/7 used the wrong prefix "generic." but the official
   1.20.6 registry uses "player." for these attributes:
   - 5: player.block_break_speed (was generic.block_break_speed)
   - 6: player.block_interaction_range (was generic.block_interaction_range)
   - 7: player.entity_interaction_range (was generic.entity_interaction_range)

2. IDs 22-24 (submerged_mining_speed, sweeping_damage_ratio,
   water_movement_efficiency) do not exist in the 1.20.6 attribute
   registry — they were introduced in 1.21. Their presence could
   cause incorrect attribute resolution.

3. Direct dictionary indexing (attributeDictionary[id]) throws
   KeyNotFoundException if the server sends an unknown attribute ID,
   crashing the packet handler. Replaced with TryGetValue and a
   safe fallback to "unknown".

Made-with: Cursor
2026-03-19 00:12:06 +08:00
..
Forge refactor(ForgeInfo.cs): Remove unused code and edit comments 2024-02-20 22:02:22 +08:00
Packet/s2c Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
PacketPalettes Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
StructuredComponents Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
ConfigurationPacketTypesIn.cs Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
ConfigurationPacketTypesOut.cs 1.20.6 - Not working yet 2024-06-16 01:19:09 +02:00
DataTypes.cs Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
PacketType18Handler.cs Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
PacketTypesIn.cs Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
PacketTypesOut.cs 1.20.6 - Not working yet 2024-06-16 01:19:09 +02:00
Protocol16.cs 1.20.6 - Not working yet 2024-06-16 01:19:09 +02:00
Protocol18.cs Fix EntityProperties attribute ID mapping for 1.20.6 2026-03-19 00:12:06 +08:00
Protocol18Forge.cs fix(Protocol18Forge.cs): Version bigger or equal 1.18 is FML3 2024-02-20 22:23:46 +08:00
Protocol18Terrain.cs 1.19.3 PlayerRemove & Explosion packet 2023-01-14 15:55:40 +08:00
SocketWrapper.cs First Version of Structured Components 2024-09-01 20:42:39 +02:00
ZlibUtils.cs Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00