- 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.
- Updated the GitHub Actions workflow to conditionally upload sources to Crowdin only for the MCCTeam/Minecraft-Console-Client repository, enhancing the workflow's flexibility.
- 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
- 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.
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
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>
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
- 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
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