Minecraft-Console-Client/MinecraftClient
Í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
..
ChatBots Update TelegramBridge.cs 2026-06-07 01:36:38 +02:00
CommandHandler Modernize data carriers to records and add primary constructors 2026-03-24 01:31:17 +00:00
Commands Cosmetic changes, UX/UI improvements in TUI mode, added colored text support in dialogs 2026-06-14 02:11:04 +02:00
config Optimized World.cs 2026-03-25 23:57:02 +01:00
Crypto Fix warnings 2026-04-06 20:36:12 +08:00
Dialogs Messaging improvements + Added auto show dialogs in classic console mode 2026-06-14 02:28:13 +02:00
Inventory Fix structured components: audit fixes, codec helpers, and serialize implementations 2026-06-11 21:33:48 +02:00
Logger add packet debug toggle 2026-06-10 17:24:25 +02:00
Mapping Merge branch 'master' of https://github.com/MCCTeam/Minecraft-Console-Client into fix/inventory-version-regressions 2026-06-05 21:13:59 +02:00
Mcp Formatted the code and removed logs from Auto Attack 2026-06-04 11:42:41 +02:00
Physics More minor optimizations 2026-03-26 18:01:56 +01:00
Properties Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
Protocol feat(inventory): expose NBT/component data in inventory MCP tools 2026-06-27 14:41:41 -03:00
Proxy Tooltip support & Bug fix 2022-12-11 13:00:19 +08:00
Resources feat: Implement the Dialog System (1.21.6+) 2026-06-14 02:31:50 +02:00
Scripting feat(inventory): expose NBT/component data in inventory MCP tools 2026-06-27 14:41:41 -03:00
TabList Added a /tab command 2026-04-04 16:17:49 +02:00
Tui Messaging improvements + Added auto show dialogs in classic console mode 2026-06-14 02:28:13 +02:00
WinAPI Fix warnings 2026-04-06 20:36:12 +08:00
Achievement.cs Implement unified achievements feature: data model, protocol handling, state management, ChatBot API, and /achievement command 2026-03-29 20:22:31 +00:00
AutoTimeout.cs Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
ClassicConsoleBackend.cs fix: restore full color depth for hex color codes (§#RRGGBB) 2026-06-17 11:04:06 +02:00
ColorHelper.cs refactor: simplify color handling in ClassicConsoleBackend 2026-04-08 02:05:26 +08:00
Command.cs Bug fix 2022-12-11 16:30:45 +08:00
ConsoleIO.cs Polish console chat visibility implementation 2026-05-04 11:36:01 +00:00
ExtensionMethods.cs Better translation 2022-10-17 20:00:33 +08:00
FileMonitor.cs refactor: convert == null / != null to is null / is not null in 31 files 2026-03-24 00:42:59 +00:00
IConsoleBackend.cs Implement console chat visibility controls 2026-05-04 11:17:45 +00:00
INIFile.cs [skip ci] Normalize all line endings 2023-09-15 14:44:11 +08:00
Json.cs Fixed a JSON exception 2026-03-26 19:16:48 +01:00
LegacyAchievementCatalog.cs Fix legacy achievements and add test harness 2026-03-30 17:25:08 +02:00
McClient.cs Messaging improvements + Added auto show dialogs in classic console mode 2026-06-14 02:28:13 +02:00
MinecraftClient.csproj Fix inventory handling across protocol versions 2026-06-05 20:26:29 +02:00
Program.cs Fix AutoRelog retry accounting 2026-06-02 10:24:59 +02:00
RecipeBookRecipeEntry.cs fix: support 1.21.11 recipe book display ids 2026-03-29 18:45:14 +00:00
Settings.cs Gate empty-packet log under debug, add packet exclusion list 2026-06-11 22:03:36 +02:00
TaskWithDelay.cs Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
TaskWithResult.cs Modernize null-check patterns: use 'is null' and 'is not null' 2026-03-24 00:28:02 +00:00
UpgradeHelper.cs Modernize null-check patterns: use 'is null' and 'is not null' 2026-03-24 00:28:02 +00:00