Commit graph

1713 commits

Author SHA1 Message Date
Anon
37271c5988 Fixed SRV resolution during transfer 2026-04-07 15:41:12 +02: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
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
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
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
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
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
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
Anon
1ca023be36 Added a Github star reminder 2026-04-03 21:15:02 +02:00
Anon
f4c160979c Merge origin/master into feat/mcp-server 2026-04-03 20:03:37 +02:00
Anon
691057fe13 Bugfixes to the Looking and Movement. Added General prompt engineer. 2026-04-03 19:54:26 +02:00
Anon
dfef24ad10 Refactored to share the new utilities between the MCP and the Chat Bot API 2026-04-03 19:06:43 +02:00
copilot-swe-agent[bot]
744dcd73cd
Fix TPS calculation: clamp values above 20 instead of discarding them
The old code filtered out any instantaneous TPS sample > 20 with
`if (tps <= 20 && tps > 0)`. Because time-update packets arrive with
OS/network jitter, many measurements on a healthy server land slightly
above 20.0 and were silently discarded, leaving only sub-20 samples in
the rolling average. This caused the reported TPS to be virtually always
lower than the true server TPS.

A Minecraft server cannot genuinely run faster than 20 TPS (it sleeps
for the remainder of each 50 ms tick budget), so any measurement above
20 is definitionally timing noise. Clamp to Math.Min(tps, 20.0) instead
of discarding the sample so a healthy server's rolling average converges
to 20.0 as expected.

Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/826926c5-78fa-4059-ab8f-4abd209f120d

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-04-03 16:24:38 +00:00
Anon
22e987070a Merge remote-tracking branch 'origin/master' into feat/optimization
# Conflicts:
#	tools/run-creative-e2e.sh
2026-04-03 15:44:59 +02:00
BruceChen
512445cb1d fix: prevent TUI StackOverflowException from excessive log controls
The TUI log view used an ItemsControl with 5000 max entries and no UI
virtualization. Avalonia's composition renderer traverses the entire
visual tree on each frame -- with thousands of TextBlock controls, the
recursive Render/RenderCore calls exceed the thread stack size on
constrained devices (especially ARM where each stack frame is larger
due to ABI differences), causing a StackOverflowException in
ServerCompositionContainerVisual.Render.

Changes:
- Enable VirtualizingStackPanel on the log ItemsControl so Avalonia
  only creates visuals for the rows currently in the viewport.
- Add [Console.General] TUI_Log_Scrollback config option so users can
  control max log lines in TUI mode. Default is 0 (automatic: 3000 on
  x86/x64, 500 on ARM/ARM64).

Made-with: Cursor
2026-04-03 03:17:53 +08:00
BruceChen
2003786608 fix: resolve AutoRelog reconnect errors (#3036)
- Reset _BotRecoAttempts on successful game join so retry counter
  does not carry stale state across sessions
- Display "unlimited" instead of near-int.MaxValue retry count when
  Retries is set to -1 (infinite)
- Guard SendText with CanSendMessage check to prevent
  NullReferenceException when bots call send after disconnect
- Catch SocketException/IOException in Protocol18 Updater thread so
  a closed socket triggers OnConnectionLost gracefully instead of an
  unhandled exception

Made-with: Cursor
2026-04-03 01:28:26 +08:00
BruceChen
2441c67178 fix: work around Consolonia libcoreclr.so DllNotFoundException on Linux single-file publish
Consolonia's Unix.Terminal uses [DllImport("libcoreclr.so")] to load
dlopen/dlsym on .NET Core. It ships a SetDllImportResolver that maps
the library name to the current process handle, but the resolver is
guarded by #if NET6_0 (exact TFM match) instead of NET6_0_OR_GREATER.
Since Consolonia targets net8.0, the resolver is never compiled in.

On self-contained single-file publishes, libcoreclr.so is bundled
inside the host binary and does not exist on disk. Without the
resolver the OS linker cannot find it, causing a DllNotFoundException
that crashes the TUI on startup. This primarily affects ARM64 Linux
users (e.g. Raspberry Pi / Debian Trixie) who almost exclusively use
self-contained publishes.

This commit registers an AssemblyLoadContext.Default.ResolvingUnmanagedDll
handler in Program.Main (before TUI init) that returns (IntPtr)(-1) for
libcoreclr.so, which the runtime interprets as the current process.

This is a temporary workaround until the upstream fix lands:
https://github.com/Consolonia/Consolonia/pull/605

Made-with: Cursor
2026-04-03 01:11:36 +08:00
milutinke
a88ca3cb71 Improved the guidance prompt 2026-04-01 13:55:18 +02:00
milutinke
fc05d2c98c Fixed item dropping issue. 2026-04-01 13:45:12 +02:00
milutinke
ee6eb84bd8 Improved the Web Based Harness 2026-04-01 13:45:12 +02:00
copilot-swe-agent[bot]
737a94475a fix: clarify autodig switch log formatting
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/e83f9c2a-a85c-4763-821b-c5b4a0db75a6

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-31 08:50:43 +00:00
copilot-swe-agent[bot]
1a86655dfb feat: add autodig tool switching
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/e83f9c2a-a85c-4763-821b-c5b4a0db75a6

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-31 08:44:23 +00:00
copilot-swe-agent[bot]
fdbffcc5bb feat: add Teams packet support (parsing, state tracking, /teams command, bot API)
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/72ea891e-ba62-4dfc-bbba-f197cd1d0404

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
2026-03-30 23:41:11 +00:00
Anon
c9b0913c1a feat(autofishing): add velocity and sound bite detection 2026-03-31 00:18:31 +02:00
Anon
c3c57c058a Moved the operator prompt from a skill to an embedded resourcce 2026-03-30 23:21:36 +02:00
Anon
968800b95a Added a bunch of new useful MCP Tools 2026-03-30 23:14:28 +02:00
Anon
d5358d3d1a
feat: Add automatic mining-speed and dig-duration handling 2026-03-30 21:41:06 +02:00
Anon
5de72de234 Fixed a wrong effect decoding on 1.20.4 2026-03-30 21:37:53 +02:00