* feat: implement interactive TUI inventory viewer - Added InventoryTui command to open an interactive terminal user interface for inventory management. - Introduced InventoryApp and InventoryMainView classes for TUI layout and functionality. - Created InventoryViewModel and SlotViewModel to manage inventory data and display. - Integrated Consolonia for enhanced console UI experience. - Updated McClient to support console message handling during TUI operation. These changes enhance user interaction with inventory management in Minecraft Console Client. * feat: enhance debugging workflow with mcc-debug.sh and TUI support - Introduced mcc-debug.sh for streamlined one-step build, server start, and MCC launch. - Added TUI mode for improved user experience during debugging sessions. - Updated mcc-env.sh to include new debug helpers and TUI mode functionality. - Enhanced SKILL.md with detailed instructions for using the new debugging tools and console modes. These changes significantly improve the debugging process for Minecraft Console Client, making it more efficient and user-friendly. * feat: introduce TUI console backend and related enhancements - Added ClassicConsoleBackend and TuiConsoleBackend to support different console I/O modes. - Implemented IConsoleBackend interface for better abstraction of console operations. - Enhanced ConsoleIO to utilize the new backend structure for input and output handling. - Introduced MainTuiView and MccTuiApp for a full-screen TUI experience using Avalonia. - Updated InventoryTuiHost to manage TUI lifecycle and interactions. These changes significantly improve the console experience in Minecraft Console Client, providing a more flexible and user-friendly interface. * refactor: remove InventoryTui command implementation - Deleted the InventoryTui class, which provided an interactive terminal user interface for inventory management. - This change simplifies the command structure as part of ongoing improvements to the console experience in Minecraft Console Client. The removal of this command is aligned with recent enhancements to the console backend and user interface. * refactor: update InventoryMainView and MainTuiView for improved UI handling - Changed several fields from readonly to mutable in InventoryMainView to allow for dynamic updates. - Introduced a new McColorParser class for parsing Minecraft color codes and creating colored text blocks. - Enhanced MainTuiView to support formatted log lines and improved notification handling. - Updated chat scrolling behavior to ensure better user experience during text input and log display. These changes streamline the UI components and enhance the overall console experience in Minecraft Console Client. * feat: enhance command input handling in MainTuiView - Updated command input to use event routing for better key handling. - Added support for Ctrl key shortcuts to improve text manipulation (e.g., word deletion, caret movement). - Implemented text cleaning on input change to prevent newline characters. - Improved health and food status bar rendering with a new method for building bar text. These changes significantly enhance the user experience in the TUI by providing more intuitive command input functionality. * feat: enhance TUI command suggestion functionality - Introduced a new CommandSuggestion struct for backend-independent suggestion handling. - Updated ConsoleIO to streamline suggestion updates for both Classic and TUI backends. - Enhanced MainTuiView to display command suggestions with improved visibility and interaction. - Increased the maximum number of displayed suggestions from 6 to 10 for better user experience. These changes significantly improve the command input experience in the TUI, making it more intuitive and user-friendly. * feat: enhance offline command autocomplete functionality - Introduced an OfflineAutocompleteHandler to provide command suggestions for offline commands. - Added support for tab cycling through suggestions in the TUI. - Improved command input handling to clear suggestions when necessary and manage user input more effectively. - Updated TuiConsoleBackend to integrate with the new autocomplete feature. These changes significantly enhance the user experience by making command input more intuitive and responsive in offline scenarios. * feat: enhance localization and user feedback in TUI - Updated various TUI components to utilize localized strings for improved user experience. - Enhanced debug state output with translated labels for better clarity. - Improved inventory command help messages with localized text. - Added new translations for console mode descriptions and inventory viewer prompts. These changes significantly enhance the usability and accessibility of the TUI in Minecraft Console Client, making it more user-friendly and informative. * feat: enforce localization for user-facing strings in AGENTS.md - Added guidelines to ensure all user-facing text, including log messages and error messages, is managed through the translation system. - Specified the use of `Translations.resx` and `Translations.Designer.cs` for localization, emphasizing the importance of avoiding hardcoded strings in source code. These changes improve the consistency and accessibility of user-facing content across the application. |
||
|---|---|---|
| .. | ||
| decompile.sh | ||
| diff_registries.py | ||
| gen_block_palette.py | ||
| gen_block_shapes.py | ||
| gen_command_argument_registry.py | ||
| gen_entity_metadata_palette.py | ||
| gen_entity_palette.py | ||
| gen_item_palette.py | ||
| mc-rcon.sh | ||
| mcc-debug.sh | ||
| mcc-env.sh | ||
| mcc-log-tail.sh | ||
| pull-translations.sh | ||
| README.md | ||
| run-creative-e2e.sh | ||
| start-server.sh | ||
MCC Version Adaptation Tools
Scripts for analyzing Minecraft version differences and generating MCC palette files.
Requires: Python 3.10+
Data Sources
Two types of data can be used as input:
| Source | How to Get | Authoritative? |
|---|---|---|
| Decompiled Java source | MinecraftDecompiler.jar → MinecraftOfficial/<ver>-decompiled/ |
Mostly (see caveat below) |
| Server data reports | java -DbundlerMainClass=net.minecraft.data.Main -jar server.jar --reports |
Yes |
Important since MC 1.21.9: Some items and blocks are registered outside Items.java/Blocks.java field declarations (via block registration callbacks). In these cases, the decompiled source undercounts entries. Always use server data reports for item and block palettes when available.
Decompiling a new MC version
# Server side (default) — also downloads server.jar into MinecraftOfficial/downloads/<ver>/
tools/decompile.sh --version 1.21.9
# Client side
tools/decompile.sh --version 1.21.9 --side CLIENT
If you keep server assets outside the repo, set MCC_SERVERS=/path/to/servers before using tools/mcc-env.sh or tools/start-server.sh.
The script auto-downloads MinecraftDecompiler.jar from GitHub releases if it doesn't exist.
Generating server data reports
cd /tmp
java -DbundlerMainClass=net.minecraft.data.Main \
-jar $MCC_SERVERS/<version>/server.jar \
--reports --output /tmp/mc_reports
This generates:
/tmp/mc_reports/reports/registries.json— all registries with protocol IDs/tmp/mc_reports/reports/blocks.json— all blocks with block state IDs/tmp/mc_reports/reports/packets.json— packet protocol definitions
diff_registries.py — Compare registries between versions
Compares Items, EntityTypes, Blocks, DataComponents, and EntityDataSerializers between two MC versions. Reports whether each palette needs updating, lists added/removed entries, and shows ID shift statistics.
# Basic comparison (decompiled source only)
python3 tools/diff_registries.py 1.21.8 1.21.9
# With cross-validation against server registries.json (recommended)
python3 tools/diff_registries.py 1.21.8 1.21.9 --registry /tmp/mc_reports/reports/registries.json
The --registry flag enables cross-validation: compares the count and set of entries found in decompiled Java source against the server's authoritative registry. Any mismatches indicate that palette generation must use server data instead of Java source.
Output indicates for each registry:
- IDENTICAL → reuse existing palette
- PALETTE UPDATE NEEDED → create new palette file + update version routing
- Count MISMATCH (with --registry) → server has entries not in Java source
gen_item_palette.py — Generate ItemPalette C# file
Two modes:
# Preferred: from server registries.json (accurate since 1.21.9)
python3 tools/gen_item_palette.py --from-registry /tmp/mc_reports/reports/registries.json 1219
# Legacy: from decompiled Items.java
python3 tools/gen_item_palette.py 1.21.1 121
Output: MinecraftClient/Inventory/ItemPalettes/ItemPalette<suffix>.cs
Validates each item name against ItemType.cs and warns about missing enum values. Add missing values to ItemType.cs in alphabetical order before compiling.
gen_block_palette.py — Generate BlockPalette C# file
python3 tools/gen_block_palette.py /tmp/mc_reports/reports/blocks.json 1219
# → MinecraftClient/Mapping/BlockPalettes/Palette1219.cs
Generates a complete block palette with block state ID ranges from the server's blocks.json. Validates against Material.cs and warns about missing enum values.
gen_entity_palette.py — Generate EntityPalette C# file
python3 tools/gen_entity_palette.py /tmp/mc_reports/reports/registries.json 1219
# → MinecraftClient/Mapping/EntityPalettes/EntityPalette1219.cs
Generates entity type palette from server's registries.json. Validates against EntityType.cs and warns about missing enum values.
gen_entity_metadata_palette.py — Generate EntityMetadataPalette C# file
python3 tools/gen_entity_metadata_palette.py 1.21.9 1219
# → MinecraftClient/Mapping/EntityMetadataPalettes/EntityMetadataPalette1219.cs
Reads EntityDataSerializers.java static block registration order. Maps Java field names to MCC's EntityMetaDataType enum. If a new serializer type appears that isn't in the mapping table, it will warn you to update:
- The script's
FIELD_TO_ENUMdict - MCC's
EntityMetaDataType.csenum DataTypes.csReadNextMetadata() read logic
gen_command_argument_registry.py — Generate DeclareCommands registry arrays
python3 tools/gen_command_argument_registry.py 1.20.6 1.21.5 1.21.6
Reads ArgumentTypeInfos.java, skips the SharedConstants.IS_RUNNING_IN_IDE block, and prints C# array initializers for the runtime COMMAND_ARGUMENT_TYPE registry order. Use this when Mojang inserts new command argument types and the modern DeclareCommands parser needs updated ID routing.
gen_block_shapes.py — Download & compact block collision shapes
Downloads block collision shapes from PrismarineJS minecraft-data and compacts them into a single JSON for MCC's physics engine.
# Auto-download for a specific MC version
python3 tools/gen_block_shapes.py 26.1
# → MinecraftClient/Physics/BlockShapeData.json
# From a local file (if network is slow)
python3 tools/gen_block_shapes.py --from-file /path/to/blockCollisionShapes.json
Output: MinecraftClient/Physics/BlockShapeData.json (embedded as a resource via .csproj).
Data source: https://raw.githubusercontent.com/PrismarineJS/minecraft-data/master/data/pc/<version>/blockCollisionShapes.json
Uses curl with resume (-C -) for reliable download over slow connections. Falls back to manual download if retries are exhausted.
Recommended workflow
- Generate server reports (Step 0)
- Run
diff_registries.py --registryto identify changes and validate source completeness - For each registry needing update:
- Items:
gen_item_palette.py --from-registry - Blocks:
gen_block_palette.py - Entities:
gen_entity_palette.py - Metadata:
gen_entity_metadata_palette.py
- Items:
- Update block collision shapes:
gen_block_shapes.py - Add any missing enum values to
ItemType.cs,Material.cs,EntityType.cs,EntityMetaDataType.cs - Update version routing (see SKILL.md)
- Build and test