Commit graph

210 commits

Author SHA1 Message Date
Anon
966b787a4c
feat: Added missing enchantments for new versions 2026-03-25 20:01:43 +01:00
BruceChen
e5b81fe428 feat: add support for unsupported container type in inventory TUI
- 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.
2026-03-26 02:35:50 +08:00
BruceChen
8456e363f5
TUI for MCC (#2976)
* 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.
2026-03-26 02:08:18 +08:00
copilot-swe-agent[bot]
d4faea9ecc fix: add lunge enchantment mapping for 1.21.11
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/16e21ef0-6f09-4280-b539-8d704ddc3b67
2026-03-25 18:00:38 +00:00
copilot-swe-agent[bot]
d3c3e5a554 fix: add names for new enchantments
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/99915717-46df-4681-a568-5a9f0b244361
2026-03-25 17:21:17 +00:00
copilot-swe-agent[bot]
7b534ca547 feat: add built-in players app var
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/c9f7aa87-50b7-4725-aa39-613eba1a07fd
2026-03-24 19:47:10 +00:00
copilot-swe-agent[bot]
db5faa22b1 Add configurable MaxChatMessageLength to override default limits for older versions
Adds a MaxChatMessageLength config option under [Main.Advanced] that allows
users to override the protocol-defined maximum chat message length. Default is
0 (auto: 100 for MC 1.10 and below, 256 for MC 1.11+). Some servers like
Hypixel support longer messages on older versions, so this lets users set a
custom limit (e.g. 256 on 1.8.9). Includes a warning about potential kicks
if set incorrectly.

Closes #2947

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/39c78e6a-f748-4f41-a905-2f5d27f99eff
2026-03-24 18:50:01 +00:00
copilot-swe-agent[bot]
5147fb42df Replace PPFT/urlPost HTML scraping with OAuth 2.0 device code flow for 2FA support
- Add Microsoft.RequestDeviceCode() and Microsoft.PollDeviceCodeToken() methods
- Remove XboxLive.PreAuth() and XboxLive.UserLogin() (HTML scraping)
- Remove PreAuthResponse struct, PPFT/urlPost regex patterns
- Update XblAuthenticate to always use "d=" prefix for OAuth tokens
- Update MicrosoftMCCLogin to use device code flow
- Skip password prompting for Microsoft device code method
- Add translation strings for device code prompts
- Update config comments and documentation

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/e13b31f3-8d76-4240-bb69-a519a145fc6a
2026-03-23 15:38:47 +00:00
copilot-swe-agent[bot]
5a9786cb0b Add Discord RPC setup tutorial, Discord Bridge AllowOtherBotMessages config, and enhance integration tests
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/a41f3e83-c88d-4c57-971b-54c380891556
2026-03-23 00:41:40 +00:00
copilot-swe-agent[bot]
02686de79c Add granular privacy controls: ShowCoordinates, ShowHealth, ShowDimension, ShowGamemode
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/43388021-4264-47e6-8403-7a1bca66d86f
2026-03-23 00:13:03 +00:00
copilot-swe-agent[bot]
8743129e72 Address code review: fix party max, rename food variable, add ShowServerAddress option
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/43388021-4264-47e6-8403-7a1bca66d86f
2026-03-23 00:08:08 +00:00
copilot-swe-agent[bot]
a2d032b549 Add Discord Rich Presence ChatBot integration
- Add DiscordRichPresence NuGet package (v1.143.0)
- Create DiscordRpc.cs ChatBot with configurable presence display
- Wire config in Settings.cs ChatBotConfig class
- Register bot in McClient.cs RegisterBots()
- Add translation strings to Translations.resx and Designer
- Add config comments to ConfigComments.resx and Designer
- Support placeholders: {server_host}, {server_port}, {username},
  {health}, {max_health}, {food}, {dimension}, {gamemode},
  {x}, {y}, {z}, {player_count}, {protocol}

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/43388021-4264-47e6-8403-7a1bca66d86f
2026-03-23 00:03:55 +00:00
Anon
ff9aa62702 Add configurable authlib-injector API path and HTTP support for Yggdrasil auth
Re-implements the changes from PR #2890, adapted for the current codebase
which uses System.Text.Json.Nodes and HttpClient instead of the legacy
Json.JSONData and hand-rolled SslStream HTTP client.

Changes:
- Settings.cs: Convert AuthlibServer from struct to class with
  [TomlDoNotInlineObject]; convert Host to a property that parses
  'host:port' syntax; add AuthlibInjectorAPIPath (default '/api/yggdrasil')
  for servers that use a different prefix (e.g. Drasl uses '/authlib-injector');
  add UseHttps (default true) so local/dev auth servers without TLS work.

- ConfigComments.resx: Add descriptive inline comments for the new
  AuthlibServer fields (Host, Port, AuthlibInjectorAPIPath, UseHttps).

- ProtocolHandler.cs: Replace three hardcoded '/api/yggdrasil/...' paths
  with AuthlibInjectorAPIPath-based paths (authenticate, refresh, join).
  Replace hand-rolled TcpClient+SslStream HTTP in DoHTTPSRequest with
  HttpClient+SocketsHttpHandler (ConnectCallback routes through ProxyHandler).
  Add useHttps parameter so HTTP-only auth servers are supported.

- KeyUtils.cs: Add AuthServerSupportsProfileKeys() that fetches the
  authlib-injector metadata endpoint and checks feature.enable_profile_key.
  Update GetNewProfileKeys() to skip key fetch when the auth server does not
  support profile keys; build the cert URL dynamically using AuthlibInjectorAPIPath
  for Yggdrasil; always fetch real certs instead of returning a dummy response.
  Remove MakeDummyResponse() which is no longer needed.

Tested against a local Drasl instance with authlib-injector 1.2.7 on a
1.21.11 Minecraft server — full auth flow (login, profile key fetch, session
join) confirmed working end-to-end.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 00:15:32 +01:00
a08381
efe23eb1f9 add Yggdrasil authlib multi-user selection. 2024-08-11 01:43:46 +08:00
breadbyte
08551097c6
Add Sentry Error Tracking (#2670)
* Add Sentry Error Tracking

* Omit personally identifiable information and add additional sentry context

* Remove debug message

* Make sentry opt-out and add related notices and strings

Also add Minecraft Version to error context

* Update build to send release info to sentry

* Adjust sentry error tracking

- Send the user-friendly Minecraft Version in the error logs
- Capture exceptions in more parts of the application

We now capture exceptions from the following locations:
- Protocol18 (1.8+) Packet errors
- Errors during client initialization phase (When client is about to start, session keys are NEVER sent to sentry)

* Make Sentry DSN configurable and repository-specific

The Sentry DSN will automatically be filled out on the main repository through the Github Actions build.

* Update build-and-release.yml

Update sed command

* style: change variable name

nitpick, just to make it a little bit more descriptive

* Add Sentry branding in README.

* remove old code (merge conflict)
2024-06-22 06:41:13 +08:00
Anon
bc0781cee9 Fixed translations crash 2024-02-28 11:48:23 +01:00
mcflurrybaby
6714d9a9d0 Add missing 1.20 advancements locales 2023-12-01 00:30:23 +02:00
Polaris_Light
a08bfca4e5
Merge branch 'master' into master 2023-11-25 17:23:06 +08:00
Polaris_Light
f07b1e964c ResolveConflict*2 2023-11-24 22:18:42 +08:00
Polaris_Light
8dfcf9c5d5 ResolveConflict 2023-11-24 21:58:55 +08:00
zorua162
1f4db70f8a Added extra config to the WebSocket bot AllowIpAlias, which allows enabling of any IP to be used to host the WebSocket bot from 2023-11-19 13:43:32 +00:00
Polaris_Light
4fc1aacca5 BetterTranslationMaybe 2023-11-16 10:10:06 +08:00
Polaris_Light
a97096cddf ImplPlayerSection 2023-11-16 00:04:56 +08:00
ozi2285
968f864f34
Added ShiftRightClick (#2582)
* Added ShiftRightClick

* Added ShiftRightClick

* Added ShiftRightClick

* Added ShiftRightClick

* Added ShiftRightClick

* Added ShiftRightClick

* Added ShiftRightClick

* Added ShiftRightClick

* Updated Protocol18.cs ShiftRightClick Description for ReinforceZwei's  Suggestion

* Just Deleted Added ShiftRightClick's Description Line

* Just Deleted Added ShiftRightClick's Description Lines

* Made Change With Informaiton ReinforceZwei Given to Me About Switch-Case and Shorten the Code.

* Re Added Lines That Got Deleted By Mistake

* Add translation key for shift right-click

---------

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2023-09-16 19:39:55 +08:00
ReinforceZwei
a8200b6e14
Add setting for allowing non-English name in player list (#2556)
Non-vanilla server may have player name other than English, for example Chinese server can have player name in Chinese. This setting allow MCC to display those non-English name in the player list.
2023-08-02 14:00:11 +08:00
Anon
c5a0409edc Added documentation examples and covered an edge case 2023-07-16 20:45:24 +02:00
Anon
272900d52e Added slab handling for 1.20/.1
Added Farm bot crops handling for 1.20/.1
Added utilities for Containers/Inventories
Added bot movement lock to prevent multiple bots that use movements from running at the same time.
General code improvements.
2023-06-23 16:25:18 +02:00
Anon
f77d58402a
Merge branch 'master' into rename-items 2023-06-03 14:29:42 +00:00
Anon
a357d2c87a Fixing merge conflict 2023-06-03 16:27:36 +02:00
Anon
081cebcf76 Fixed typos and fixed a merge conflict 2023-06-03 16:23:07 +02:00
Anon
fce12db33f Added a command to (re)name items in the Anvil 2023-06-03 16:12:17 +02:00
Anon
1efa55206f Re-added WebSocketChat bot and improved it, no longer using WebsocketSharp library 2023-05-27 19:46:28 +02:00
Anon
cfc2baa4e7 Translated 2023-05-21 12:11:58 +02:00
Anon
0f77828ac5 Updated translations 2023-03-26 14:33:06 +02:00
BruceChen
730cdf92e7 Merge remote-tracking branch 'origin/master' into pr/2393 2023-01-16 14:46:18 +08:00
BruceChen
d65f69fad4
[SKIP_BUILD]Merge pull request #2405 from ReinforceZwei/attack_range
AutoAttack: Add setting for attack range
2023-01-16 14:16:37 +08:00
BruceChen
50dd5a3ba3 Support specifying the digging duration 2023-01-15 20:56:10 +08:00
BruceChen
ba0d9ba3fc merge brigadier-dev into milutinke:1.19.3 2023-01-14 20:42:15 +08:00
BruceChen
fe0b268878 1.19.3 Message signing support. 2023-01-13 16:12:10 +08:00
ReinforceZwei
96245193ee Revert language change in auto-gen file 2023-01-10 17:01:36 +08:00
ReinforceZwei
640abd2d78 AutoAttack: Add setting for attack range 2023-01-10 16:52:18 +08:00
BruceChen
7ee08092d4 legacy color support 2022-12-14 14:45:51 +08:00
BruceChen
94a3c92b36 Bug fix 2022-12-11 16:30:45 +08:00
BruceChen
127978615c Update tip message 2022-12-11 14:54:11 +08:00
BruceChen
5e11ed3896 Tooltip support & Bug fix 2022-12-11 13:00:19 +08:00
BruceChen
892999ac98 Merge into master 2022-12-06 20:32:46 +08:00
BruceChen
84cf749344 Implement command completion suggestions. 2022-12-06 15:50:17 +08:00
BruceChen
2ad6d02d59 Display ETA when downloading. 2022-12-01 23:37:15 +08:00
BruceChen
28827b720a Support downloading updates via command. 2022-12-01 22:55:48 +08:00
BruceChen
2331590588 Store the text resources of the setting file separately. 2022-11-30 16:22:48 +08:00