Minecraft-Console-Client/MinecraftClient/Protocol/Handlers/StructuredComponents/Components
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
..
1_20_6 fix: resolve entity tracking, container interaction, and enchantment mapping issues for 1.21 2026-03-20 02:35:52 +08:00
1_21 Preliminary 1.21 Support 2024-12-06 16:45:48 +01:00
1_21_2 feat: add packet palette, data components, and protocol fixes for MC 1.21.2 2026-03-20 03:25:20 +08:00
1_21_5 fix: use HashedStack for container_click and fix enchantments parsing for 1.21.5+ 2026-03-22 02:18:01 +08:00
1_21_11 feat: add version routing, structured components, and metadata for MC 1.21.11 2026-03-22 00:56:04 +08:00
Subcomponents feat: protocol 767 (1.21) packet handling and AttributeSubComponent update 2026-03-20 01:22:25 +08:00
EmptyComponent.cs Added more components + added item palette reference 2024-09-11 20:35:23 +02:00