- Updated the Container class to include a protocol version parameter for accurate container type mapping.
- Modified the GetContainerType method to account for changes in container types introduced in Minecraft 1.20.4.
- Added new container types, including Crafter, to the ContainerType enum.
- Adjusted ContainerTypeExtensions to reflect the new container mappings and ensure compatibility with the updated protocol.
- Simplified the condition for disabling tab cycling by checking only for the Tab key.
- Improved clarity in the command key down event handling for better user experience.
- Introduced a new `StartupState` class to encapsulate the state collected before the console backend initialization.
- Updated the configuration loading process to handle legacy upgrades and provide detailed feedback on configuration status.
- Enhanced the TUI backend to utilize the new startup state for improved initialization flow.
- Refactored the `LoadFromFile` method in `Settings` to return a structured result, improving error handling and clarity.
- Improved the exit process by ensuring the backend shutdown is called after handling offline prompts.
- Enhanced command input history management by encapsulating text setting logic in a dedicated method to prevent event handler interference.
- Adjusted the background color in the color parser for better visibility.
- Increased the sleep duration in the TUI exit guard thread to ensure a smoother shutdown process.
- Implemented a check in the Inventory command to log a warning and return a failure status if the container type is not PlayerInventory.
- Added a new localized string for the warning message to inform users about unsupported container types.
These changes improve user feedback and error handling in the inventory management system.
- Added support for the new world border hit flag in Protocol18 for protocol version 1.21.2.
- Updated SocketWrapper to throw a SocketException if SendDataRAW is called when not connected, improving error handling.
These changes enhance the protocol handling and error management in the Minecraft Console Client.
* 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.
Port the WebSocket bot functionality to an external standalone script that:
- Uses //MCCScript 1.0 format instead of being a built-in bot
- Uses System.Text.Json instead of Newtonsoft.Json (no external DLL)
- Serializes ItemType, EntityType, and other enums as string names
instead of numeric IDs (addresses #2805)
- Adds GetItemTypeMappings and GetEntityTypeMappings commands
- Accepts both string names and numeric IDs for enum parameters
- Uses 4096 byte WebSocket buffer for better message handling
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When AutoRelog was enabled and the server was offline (SocketException during
initial connection), AutoRelog's reconnection logic was never invoked. The
Retry block's else branch either called HandleFailure() without a disconnect
reason (so AutoRelog.OnDisconnectStatic was skipped) or did nothing at all.
Now the else branch directly calls AutoRelog.OnDisconnectStatic with the
standard "Connection has been lost" message (matching the default
Kick_Messages), ensuring reconnection is properly triggered.
FixesMCCTeam/Minecraft-Console-Client#2781
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/30698499-fdeb-44ce-9552-a64c4c5fb62b