Minecraft-Console-Client/MinecraftClient/Protocol/Handlers
BruceChen c0c4c078c0 fix: use HashedStack for container_click and fix enchantments parsing for 1.21.5+
Two bugs fixed:

1. EnchantmentsComponent was reading a trailing ShowTooltip boolean that
   was removed from the wire format in MC 1.21.5. Created
   EnchantmentsComponent1215 and StoredEnchantmentsComponent1215 that
   omit the boolean. Used by StructuredComponentsRegistry1215 and 12111.

2. MC 1.21.5+ changed ServerboundContainerClickPacket to use HashedStack
   (item holder id + count + hashed component patch map) instead of full
   ItemStack for changed slots and carried item. Added GetHashedItemSlot()
   in DataTypes.cs and gated SendWindowAction in Protocol18.cs to use it
   for 1.21.5+. Since MCC doesn't track component hashes, an empty
   HashedPatchMap is sent; the server detects stateId mismatch and resyncs.

Tested: AutoFishing bot successfully catches fish on MC 1.21.11 with
enchanted fishing rods (Lure III + Luck of the Sea III).

Made-with: Cursor
2026-03-22 02:18:01 +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 feat: add palettes for MC 1.21.9/1.21.10 (protocol 773) 2026-03-21 14:04:56 +08:00
StructuredComponents fix: use HashedStack for container_click and fix enchantments parsing for 1.21.5+ 2026-03-22 02:18:01 +08:00
ConfigurationPacketTypesIn.cs feat: add MC 1.21.9/1.21.10 (protocol 773) version constants and enum values 2026-03-21 14:04:42 +08:00
ConfigurationPacketTypesOut.cs feat: add MC 1.21.9/1.21.10 (protocol 773) version constants and enum values 2026-03-21 14:04:42 +08:00
DataTypes.cs fix: use HashedStack for container_click and fix enchantments parsing for 1.21.5+ 2026-03-22 02:18:01 +08:00
PacketType18Handler.cs feat: add version routing, structured components, and metadata for MC 1.21.11 2026-03-22 00:56:04 +08:00
PacketTypesIn.cs feat: add MC 1.21.9/1.21.10 (protocol 773) version constants and enum values 2026-03-21 14:04:42 +08:00
PacketTypesOut.cs feat: add MC 1.21.6 (protocol 771) version constants and enum values 2026-03-21 11:34:20 +08:00
Protocol16.cs 1.20.6 - Not working yet 2024-06-16 01:19:09 +02:00
Protocol18.cs fix: use HashedStack for container_click and fix enchantments parsing for 1.21.5+ 2026-03-22 02:18:01 +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 fix: correct biome data array length calculation for 1.21.5+ terrain parsing 2026-03-21 12:11:18 +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