Minecraft-Console-Client/MinecraftClient/Protocol
copilot-swe-agent[bot] 8ab9f8505f Fix crash when scoreboard is updated on MC 1.20.4+
ChatParser.NbtToString crashed with InvalidCastException when a scoreboard
update was received. The switch expressions for extra/with NBT arrays only
handled int and string; everything else fell through to a hard cast to
Dictionary<string,object>, which fails for long/short/byte/float/double.

Replace with a pattern that explicitly matches string and Dictionary, and
converts all other values (any numeric NBT type) to a text component via
ToString(). This matches the behavior that ReadNbtField can return for
TAG_Byte, TAG_Short, TAG_Int, TAG_Long, TAG_Float, and TAG_Double.

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/44b66082-14ee-4966-9c23-4074134e0187
2026-03-24 19:58:58 +00:00
..
Handlers Add configurable MaxChatMessageLength to override default limits for older versions 2026-03-24 18:50:01 +00:00
Message Fix crash when scoreboard is updated on MC 1.20.4+ 2026-03-24 19:58:58 +00:00
ProfileKey refactor: convert == null / != null to is null / is not null in 31 files 2026-03-24 00:42:59 +00:00
Session refactor: convert == null / != null to is null / is not null in 31 files 2026-03-24 00:42:59 +00:00
DataTypeGenerator.cs Replace legacy custom JSON parser with System.Text.Json 2026-03-22 16:39:26 +00:00
EntityActionType.cs [SKIP_BUILD] Change file encoding to UTF-8 with BOM 2022-11-28 13:55:05 +08:00
GuidExtensions.cs Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
IMinecraftCom.cs Run MCC at true 20 TPS 2026-03-23 14:29:04 +01:00
IMinecraftComHandler.cs Run MCC at true 20 TPS 2026-03-23 14:29:04 +01:00
JwtPayloadDecode.cs Fix all warnings & Trim (#2226) 2022-10-02 18:31:08 +08:00
MicrosoftAuthentication.cs Address code review: add SlowDownIncrementSeconds constant, return OtherError for device code failures 2026-03-23 15:41:25 +00:00
MojangAPI.cs Modernize data carriers to records and add primary constructors 2026-03-24 01:31:17 +00:00
PlayerInfo.cs Modernize null-check patterns: use 'is null' and 'is not null' 2026-03-24 00:28:02 +00:00
ProtocolHandler.cs Merge remote-tracking branch 'origin/master' into copilot/modernize-code-to-csharp-14 2026-03-24 08:52:57 +00:00
ProxiedWebRequest.cs Modernize data carriers to records and add primary constructors 2026-03-24 01:31:17 +00:00
ReplayHandler.cs Run MCC at true 20 TPS 2026-03-23 14:29:04 +01:00