Commit graph

2244 commits

Author SHA1 Message Date
BruceChen
5363ef7bc1
Merge pull request #3068 from BruceChenQAQ/master
refactor: simplify color handling in ClassicConsoleBackend
2026-04-08 03:10:07 +08:00
BruceChen
740de13d98 refactor: enhance XLIFF parsing in Crowdin translation script
- Added support for an `include_paths` parameter to filter files based on specified prefixes, taking priority over `exclude_paths`.
- Updated the `parse_xliff` and `process_language` functions to accommodate the new filtering logic.
- Enhanced command-line argument parsing to allow users to specify files for translation directly, improving flexibility in translation management.
2026-04-08 02:52:07 +08:00
BruceChen
edadd91016 chore: update subproject commit reference for ConsoleInteractive 2026-04-08 02:50:39 +08:00
BruceChen
ff00d01fd7 refactor: simplify color handling in ClassicConsoleBackend
- Removed hex color handling logic from ClassicConsoleBackend, streamlining the WriteLineFormatted method.
- Updated ColorHelper to ensure consistent formatting for color codes.
- Ensured console-specific settings are reapplied after backend initialization in Program.cs.
2026-04-08 02:05:26 +08:00
BruceChen
64c42bb4b5
[skipci] Merge pull request #3067 from BruceChenQAQ/master
Optimize translate script
2026-04-08 01:32:38 +08:00
BruceChen
698a562156 refactor: update output directory handling in Crowdin translation script
- Removed the default output directory constant and updated the logic to set the output directory based on the provided argument or default to a "translated" subdirectory within the bundle directory.
- Improved help text for the output directory argument to clarify its default behavior.
2026-04-08 01:30:35 +08:00
BruceChen
7ec9d64b5b refactor: optimize translation unit handling in Crowdin script
- Introduced a new variable to track successfully translated units, improving clarity and efficiency in the processing logic.
- Updated the logic for combining existing and new translation units, ensuring accurate output and preventing unnecessary uploads when no new translations are available.
2026-04-08 01:30:35 +08:00
Anon
756bc1e11f
bugfix: Fixed a non-existant configuration packet from crashing the client. 2026-04-07 18:25:43 +02:00
Anon
5a5165e89f Fixed a non-existant configuration packet from crashing the client. 2026-04-07 17:00:01 +02:00
Anon
0e15806722
bugfix: Fixed SRV resolution during transfer 2026-04-07 15:43:12 +02:00
Anon
37271c5988 Fixed SRV resolution during transfer 2026-04-07 15:41:12 +02:00
BruceChen
35fd34b19d
Merge pull request #3062 from BruceChenQAQ/master
feat: add Crowdin translation automation script
2026-04-07 02:15:28 +08:00
BruceChen
ad065225ba feat: enhance game language support in settings
- Added documentation for mapping system CultureInfo names to Minecraft game language codes.
- Included support for Tagalog (tl and tl-PH) language codes in the game settings.
2026-04-07 02:03:02 +08:00
BruceChen
0445d95c23 feat: add support for additional game languages in settings
- Added support for Filipino (fil and fil-PH) and Norwegian (no) language codes in the game settings.
- Corrected formatting for existing language codes to ensure consistency and prevent potential issues with language recognition.
2026-04-07 01:58:29 +08:00
BruceChen
37bda82828 feat: add deduplication for cached domain prompt translations
- Implemented a new function to remove duplicate paragraphs from cached translations, addressing issues with the API returning repeated content.
- Updated the caching logic to apply deduplication both when loading from cache and after generating new translations, ensuring cleaner and more accurate cached data.
2026-04-07 00:52:18 +08:00
BruceChen
5dde778b53 refactor: improve XLIFF file handling in translation script
- Enhanced the `find_xliff_files` function to preserve the order of locales when mapping Crowdin locales to XLIFF paths.
- Updated the logic to return all available locales when no specific locales are provided, ensuring better handling of XLIFF files.
- Simplified the iteration over XLIFF files by removing unnecessary sorting in the final loop.
2026-04-07 00:50:24 +08:00
BruceChen
47f13a815c feat: add Crowdin translation automation script
- Introduced a new Python script for automating the translation of Crowdin XLIFF bundles using the Alibaba Cloud Qwen-MT API.
- Updated .gitignore to include the Crowdin translation working directory, ensuring that temporary files are not tracked.
- The script supports downloading, parsing, translating, and uploading XLIFF files, streamlining the localization process.
2026-04-07 00:30:52 +08:00
BruceChen
f432637710 fix: update GitHub link in MccBannerPanelBuilder
- Changed the GitHub link in the MccBannerPanelBuilder to use the full URL format for better accessibility.
2026-04-06 20:36:12 +08:00
BruceChen
e81700bf0e Fix warnings 2026-04-06 20:36:12 +08:00
BruceChen
b6bfecc622 fix: update build command in GitHub Actions workflow
- Modified the build command in the GitHub Actions workflow to use the .csproj file directly instead of the solution file, ensuring a more accurate build process for the specified project.
2026-04-06 20:36:12 +08:00
BruceChen
44e7f205c8 fix: disable transitive Avalonia compilation in project file
- Added a property to the MinecraftClient.csproj to disable the default Avalonia compilation, preventing file-lock races during parallel builds, as the project does not utilize XAML resources.
2026-04-06 20:36:12 +08:00
BruceChen
3073137006 fix: conditionally upload sources to Crowdin based on repository
- Updated the GitHub Actions workflow to conditionally upload sources to Crowdin only for the MCCTeam/Minecraft-Console-Client repository, enhancing the workflow's flexibility.
2026-04-06 20:14:02 +08:00
BruceChen
5c323772b3 fix: update Crowdin project URL in documentation and settings
- Corrected the Crowdin project URL in README.md, Settings.cs, and contributing.md to the official link.
2026-04-06 19:57:45 +08:00
BruceChen
0f32771075 fix: prevent concurrent restart flood on rapid /reco (#3046)
- Add reentrant guard to Program.Restart: track the active restart
  thread and silently drop concurrent calls from other threads while
  allowing the restart thread itself to chain a new restart (needed
  for AutoRelog retry flow).
- Fix double AutoRelog.OnDisconnectStatic invocation in HandleFailure:
  the method was called once in the error-message branch and again in
  the interactive-mode branch for the same failure event, doubling the
  retry counter increment and potentially spawning duplicate restarts.

Made-with: Cursor
2026-04-06 19:51:17 +08:00
BruceChen
e6ea29c914
[skipci] Merge pull request #3055 from BruceChenQAQ/master
[skipci] feat: Enhance GitHub Actions workflow with secret checks for deployment
2026-04-06 01:36:22 +08:00
BruceChen
e1f3dd5fdb
feat: Enhance GitHub Actions workflow with secret checks for deployment
- Added a job to check for the presence of required secrets (GH_PAGES_TOKEN, Crowdin secrets) before proceeding with documentation deployment and translation downloads.
- Updated the deployment job to conditionally run based on the results of the secret checks.
- Upgraded the Crowdin GitHub Action to version 2.4.0 for improved functionality.
2026-04-06 01:33:34 +08:00
BruceChen
7fd70ccf38 fix: Support hex RGB colors (#RRGGBB) in chat messages (fixes #2054)
Minecraft 1.16+ servers can send custom hex colors in JSON text
components ("color": "#RRGGBB"). MCC's ChatParser.Color2tag() only
recognized the 16 named colors, silently dropping hex values and
leaving gradient/custom-colored chat as uncolored plain text.

- ChatParser: recognize hex color values and emit internal §#rrggbb
  encoding; extend ColorCodeRegex to match the new format
- ClassicConsoleBackend: resolve §#rrggbb to ANSI escape codes via
  ColorHelper before passing to ConsoleInteractive (adapts to the
  configured ConsoleColorMode: 24-bit, 8-bit, 4-bit, or disable)
- McColorParser (TUI): parse §#rrggbb into exact SolidColorBrush
  for full RGB fidelity in Avalonia
- ChatBot.GetVerbatim(): skip the full 8-char §#rrggbb sequence
  instead of only 2 chars, preventing hex digits from leaking into
  stripped text

Made-with: Cursor
2026-04-06 01:19:19 +08:00
BruceChen
914c56fc6e
Merge pull request #3053 from BruceChenQAQ/master
Fix: chat colors not displayed in the TUI inventory screen
2026-04-06 00:36:23 +08:00
BruceChen
7f3b2c26da chore: Update Sentry package reference to version 6.3.0 2026-04-06 00:35:15 +08:00
BruceChen
49b7b98ba8 chore: Update package references for Consolonia and Magick.NET to latest versions 2026-04-06 00:35:15 +08:00
BruceChen
7405aad68f refactor: Simplify MainTuiView by removing architecture check for default return value 2026-04-06 00:35:15 +08:00
BruceChen
b083336bf6 refactor: Replace TextBlock creation with McColorParser for improved text rendering in chat display 2026-04-06 00:35:15 +08:00
BruceChen
a40188cb09
Merge pull request #3049 from BruceChenQAQ/master
feat: Add TUI support for /map
2026-04-06 00:24:27 +08:00
BruceChen
c7166f1cbc fix: Update zoom display in MapOverlay to show one decimal place for improved readability 2026-04-05 18:11:05 +08:00
BruceChen
c19ce62e98 fix: Adjust zoom step in MapOverlay for finer control during zooming 2026-04-05 18:09:20 +08:00
BruceChen
98ad174999 refactor: Simplify zoom functionality in MapOverlay by introducing NextStepScale method for smoother zoom transitions 2026-04-05 18:08:08 +08:00
BruceChen
296070f7e4 feat: Update map overlay to support interactive zoom and pan, and enhance header with zoom percentage display 2026-04-05 18:03:10 +08:00
BruceChen
0dde017ecc Add TUI support for /map 2026-04-05 17:41:32 +08:00
BruceChen
871bc7651f feat: Enhance command input handling by adding support for multi-line text input and refining text change logic 2026-04-05 17:41:11 +08:00
BruceChen
a6c832b744 Replaces the 120-TextBlock Grid (one per pixel) with a 7-TextBlock StackPanel using Run inlines for coloring. This eliminates ~113 unnecessary composition visual nodes from the banner icon. 2026-04-05 17:40:51 +08:00
Anon
33144b16d4
bugfix: Fixed the explosion packet on 26.1 2026-04-04 23:13:23 +02:00
Anon
81be654601 Fixed the explosion packet on 26.1 2026-04-04 23:12:05 +02:00
Anon
0cc34e6e22
bugfix: Fixed teams packet for 1.8 - 1.12.3 + Added text formatting for names in the tab list 2026-04-04 22:27:34 +02:00
Anon
32d5ad1108 Added text parsing in the tab player list 2026-04-04 22:25:40 +02:00
Anon
16e3a69211 Fixed teams packet for 1.8 - 1.12.3 2026-04-04 21:34:52 +02:00
BruceChen
6e86edc632 feat: Refactor MapColors class to load color palette from JSON resource 2026-04-05 01:17:57 +08:00
Anon
76c3403700
feat: Added a /tab command to display the list of online players 2026-04-04 16:21:06 +02:00
Anon
c8286f60c1 Added a /tab command 2026-04-04 16:17:49 +02:00
Anon
23262de6c2
bugfix: Fixed teams packet crash 2026-04-04 14:32:12 +02:00
Anon
a12ba29c45 Fixed teams packet crash 2026-04-04 14:30:44 +02:00