Minecraft-Console-Client/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5
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
..
BlocksAttacksComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
EitherHolderComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
EnchantmentsComponent1215.cs fix: use HashedStack for container_click and fix enchantments parsing for 1.21.5+ 2026-03-22 02:18:01 +08:00
InstrumentComponent1215.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
PaintingVariantHolderComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
PotionDurationScaleComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
ProvidesBannerPatternsComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
ProvidesTrimMaterialComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
SoundEventHolderComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
StoredEnchantmentsComponent1215.cs fix: use HashedStack for container_click and fix enchantments parsing for 1.21.5+ 2026-03-22 02:18:01 +08:00
TooltipDisplayComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
VarIntComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00
WeaponComponent.cs feat: add MC 1.21.5 (protocol 770) support 2026-03-21 00:48:27 +08:00