Minecraft-Console-Client/MinecraftClient/Protocol/Handlers
Ítalo Seara f34b8ba989 feat(inventory): expose NBT/component data in inventory MCP tools
Add a nullable `Nbt` field to `MccInventorySnapshotSlot`,
`MccInventorySearchMatch`, and `MccItemStackSnapshot` so that callers
can access the full item metadata beyond just material and count.

For 1.20.6+ servers the field is a map of component name
(e.g. "minecraft:custom_data") to the serialized component object.
For legacy servers it is the raw NBT dictionary. The field is omitted
entirely for vanilla items that carry no extra data, so there is no
noise for plain items like Stone or Dirt.

Implementation:
- `StructuredComponent`: add `ComponentName` property (set by the
  registry during parse) and mark both it and `TypeId` with
  `[JsonIgnore]` so they are excluded from component serialization.
- `StructuredComponentRegistry.ParseComponent`: assign `ComponentName`
  after instantiation.
- `MccGameCommon.BuildNbt`: new helper that serializes components by
  runtime type (fixing the polymorphism issue with System.Text.Json)
  keyed by component name, falling back to the legacy NBT dictionary.
- Snapshot and search query builders updated to call `BuildNbt`.
2026-06-27 14:41:41 -03:00
..
Forge Formatted the code and removed logs from Auto Attack 2026-06-04 11:42:41 +02:00
Packet/s2c Modernize data carriers to records and add primary constructors 2026-03-24 01:31:17 +00:00
PacketPalettes Merge branch 'master' of https://github.com/MCCTeam/Minecraft-Console-Client into fix/inventory-version-regressions 2026-06-05 21:13:59 +02:00
StructuredComponents feat(inventory): expose NBT/component data in inventory MCP tools 2026-06-27 14:41:41 -03:00
ConfigurationPacketTypesIn.cs Formatted the code and removed logs from Auto Attack 2026-06-04 11:42:41 +02:00
ConfigurationPacketTypesOut.cs Formatted the code and removed logs from Auto Attack 2026-06-04 11:42:41 +02:00
DataTypes.cs protocol gap fixes 2026-06-12 01:05:19 +02:00
PacketType18Handler.cs Fix inventory handling across protocol versions 2026-06-05 20:26:29 +02:00
PacketTypesIn.cs Fix inventory handling across protocol versions 2026-06-05 20:26:29 +02:00
PacketTypesOut.cs feat: add 26.1 packet palette, structured components registry, and version routing 2026-03-22 20:04:08 +08:00
Protocol16.cs Dialog System First iteration, not tested 2026-06-13 23:59:44 +02:00
Protocol18.cs Dialog System First iteration, not tested 2026-06-13 23:59:44 +02:00
Protocol18Forge.cs Formatted the code and removed logs from Auto Attack 2026-06-04 11:42:41 +02:00
Protocol18Terrain.cs Modernize data carriers to records and add primary constructors 2026-03-24 01:31:17 +00:00
SocketWrapper.cs feat: enhance Protocol18 and SocketWrapper for improved functionality 2026-03-26 02:35:43 +08:00
ZlibUtils.cs Implemented .net 10 support. Updated all affected libraries and the code. Not testes yet. 2026-03-21 20:07:20 +01:00