Minecraft-Console-Client/MinecraftClient/Scripting
Í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
..
DynamicRun/Builder Fixed Script Scheduler bug 2026-06-06 12:09:36 +02:00
AssemblyResolver.cs Implement command completion suggestions. 2022-12-06 15:50:17 +08:00
BotMovementLock.cs Added slab handling for 1.20/.1 2023-06-23 16:25:18 +02:00
ChatBot.cs Fixed Script Scheduler bug 2026-06-06 12:09:36 +02:00
CSharpRunner.cs Tidy script diagnostic helpers 2026-06-13 21:49:12 +00:00
DataPath.cs Add English translations to DataPath comments 2026-06-21 10:53:11 +08:00
MccGameApi.cs feat(inventory): expose NBT/component data in inventory MCP tools 2026-06-27 14:41:41 -03:00
MccGameCommon.cs feat(inventory): expose NBT/component data in inventory MCP tools 2026-06-27 14:41:41 -03:00
MccGameModels.cs feat(inventory): expose NBT/component data in inventory MCP tools 2026-06-27 14:41:41 -03:00
MccGameResult.cs Refactored to share the new utilities between the MCP and the Chat Bot API 2026-04-03 19:06:43 +02:00
MccObservedState.cs Refactored to share the new utilities between the MCP and the Chat Bot API 2026-04-03 19:06:43 +02:00