Minecraft-Console-Client/MinecraftClient
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
..
ChatBots fix: resolve AutoRelog reconnect errors (#3036) 2026-04-03 01:28:26 +08:00
CommandHandler Modernize data carriers to records and add primary constructors 2026-03-24 01:31:17 +00:00
Commands feat: add Teams packet support (parsing, state tracking, /teams command, bot API) 2026-03-30 23:41:11 +00:00
config Optimized World.cs 2026-03-25 23:57:02 +01:00
Crypto refactor: convert == null / != null to is null / is not null in 31 files 2026-03-24 00:42:59 +00:00
Inventory Enhance container handling for Minecraft protocol updates 2026-03-28 02:17:47 +08:00
Logger refactor: convert == null / != null to is null / is not null in 31 files 2026-03-24 00:42:59 +00:00
Mapping Merge remote-tracking branch 'origin/master' into feat/optimization 2026-04-03 15:44:59 +02:00
Physics More minor optimizations 2026-03-26 18:01:56 +01:00
Properties Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
Protocol Merge remote-tracking branch 'origin/master' into feat/optimization 2026-04-03 15:44:59 +02:00
Proxy Tooltip support & Bug fix 2022-12-11 13:00:19 +08:00
Resources fix: prevent TUI StackOverflowException from excessive log controls 2026-04-03 03:17:53 +08:00
Scripting feat: add Teams packet support (parsing, state tracking, /teams command, bot API) 2026-03-30 23:41:11 +00:00
Tui fix: prevent TUI StackOverflowException from excessive log controls 2026-04-03 03:17:53 +08:00
WinAPI Bug fix 2022-10-10 10:56:12 +08:00
Achievement.cs Implement unified achievements feature: data model, protocol handling, state management, ChatBot API, and /achievement command 2026-03-29 20:22:31 +00:00
AutoTimeout.cs Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
ClassicConsoleBackend.cs TUI for MCC (#2976) 2026-03-26 02:08:18 +08:00
ColorHelper.cs Modernize data carriers to records and add primary constructors 2026-03-24 01:31:17 +00:00
Command.cs Bug fix 2022-12-11 16:30:45 +08:00
ConsoleIO.cs Refactor ConsoleIO and Program settings handling 2026-03-29 00:54:34 +08:00
ExtensionMethods.cs Better translation 2022-10-17 20:00:33 +08:00
FileMonitor.cs refactor: convert == null / != null to is null / is not null in 31 files 2026-03-24 00:42:59 +00:00
IConsoleBackend.cs TUI for MCC (#2976) 2026-03-26 02:08:18 +08:00
INIFile.cs [skip ci] Normalize all line endings 2023-09-15 14:44:11 +08:00
Json.cs Fixed a JSON exception 2026-03-26 19:16:48 +01:00
LegacyAchievementCatalog.cs Fix legacy achievements and add test harness 2026-03-30 17:25:08 +02:00
McClient.cs Fix TPS calculation: clamp values above 20 instead of discarding them 2026-04-03 16:24:38 +00:00
MinecraftClient.csproj Minimap support 2026-03-29 19:53:50 +08:00
Program.cs fix: work around Consolonia libcoreclr.so DllNotFoundException on Linux single-file publish 2026-04-03 01:11:36 +08:00
RecipeBookRecipeEntry.cs fix: support 1.21.11 recipe book display ids 2026-03-29 18:45:14 +00:00
Settings.cs fix: prevent TUI StackOverflowException from excessive log controls 2026-04-03 03:17:53 +08:00
TaskWithDelay.cs Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
TaskWithResult.cs Modernize null-check patterns: use 'is null' and 'is not null' 2026-03-24 00:28:02 +00:00
UpgradeHelper.cs Modernize null-check patterns: use 'is null' and 'is not null' 2026-03-24 00:28:02 +00:00