Replace lowercase primary constructor parameter references (dataTypes.,
subComponentRegistry., itemPalette.) with PascalCase base class property
references (DataTypes., SubComponentRegistry., ItemPalette.) in method
bodies of all StructuredComponent and SubComponent subclasses.
This eliminates CS9107 warnings where subclass primary constructor
parameters shadow the base class properties they are assigned to.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Convert remaining == null to is null and != null to is not null
across 17 files in CommandHandler/ArgumentType, StructuredComponents,
and DeclareCommands for idiomatic C# style.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace explicit constructor calls with target-typed new() expressions
where the type is already specified on the left side of the assignment.
This is a C# 9+ feature that reduces redundancy.
Files changed:
- Container.cs: field assignments in constructors
- EntityPalette18/112/113.cs: static field initializers
- ChatParser.cs: StringBuilder local variable
- Movement.cs: field assignments in constructor
- PacketPalette18.cs: field initializers
- EnchantmentMapping.cs: field reassignments
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- DirectionExtensions.cs: Convert GetOpposite() to switch expression,
use file-scoped namespace, use collection expression for HORIZONTAL
- McClient.cs: Convert InteractType switch to expression, use collection
expressions for array literals
- Protocol18.cs: Replace Array.Empty<byte>() with [], use collection
expressions for byte/int array literals
- DataTypes.cs: Use collection expression for TAG_End byte array
- ChatBot.cs: Use collection expressions for string/char arrays
- Location.cs: Use collection expressions and modernize null check
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/milutinke/Minecraft-Console-Client/sessions/4e9bd25b-22c5-47c2-98f9-6025d927b1d6
Replace '== null' with 'is null' and '!= null' with 'is not null'
across 19 core files following modern C# pattern matching conventions.
Only literal null comparisons are changed. Assignments, value
comparisons, and LINQ expressions are left untouched.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace '== null' with 'is null' and '!= null' with 'is not null'
for all 25 null comparisons in the file, following modern C# pattern
matching conventions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace '== null' with 'is null' and '!= null' with 'is not null'
across 51 occurrences to use idiomatic C# pattern matching.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace all lock object declarations using 'object' type with the C# 13
System.Threading.Lock type across 12 files. The Lock type provides a
more efficient locking mechanism - when used with lock(), the compiler
automatically uses Lock.EnterScope() instead of Monitor.Enter/Exit.
Also made two previously non-readonly lock fields readonly:
- McClient.DigLock
- Protocol18.MessageSigningLock
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Re-implements the changes from PR #2890, adapted for the current codebase
which uses System.Text.Json.Nodes and HttpClient instead of the legacy
Json.JSONData and hand-rolled SslStream HTTP client.
Changes:
- Settings.cs: Convert AuthlibServer from struct to class with
[TomlDoNotInlineObject]; convert Host to a property that parses
'host:port' syntax; add AuthlibInjectorAPIPath (default '/api/yggdrasil')
for servers that use a different prefix (e.g. Drasl uses '/authlib-injector');
add UseHttps (default true) so local/dev auth servers without TLS work.
- ConfigComments.resx: Add descriptive inline comments for the new
AuthlibServer fields (Host, Port, AuthlibInjectorAPIPath, UseHttps).
- ProtocolHandler.cs: Replace three hardcoded '/api/yggdrasil/...' paths
with AuthlibInjectorAPIPath-based paths (authenticate, refresh, join).
Replace hand-rolled TcpClient+SslStream HTTP in DoHTTPSRequest with
HttpClient+SocketsHttpHandler (ConnectCallback routes through ProxyHandler).
Add useHttps parameter so HTTP-only auth servers are supported.
- KeyUtils.cs: Add AuthServerSupportsProfileKeys() that fetches the
authlib-injector metadata endpoint and checks feature.enable_profile_key.
Update GetNewProfileKeys() to skip key fetch when the auth server does not
support profile keys; build the cert URL dynamically using AuthlibInjectorAPIPath
for Yggdrasil; always fetch real certs instead of returning a dummy response.
Remove MakeDummyResponse() which is no longer needed.
Tested against a local Drasl instance with authlib-injector 1.2.7 on a
1.21.11 Minecraft server — full auth flow (login, profile key fetch, session
join) confirmed working end-to-end.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace `source ~/.zshrc` with `source "$REPO_ROOT/tools/mcc-env.sh"` in
ensure_offline_server.sh and run_full_spectrum_test.sh
- Convert both scripts from zsh to bash (#!/usr/bin/env bash) so mcc-env.sh
can be sourced natively; replace ${0:A:h} with portable SCRIPT_DIR expansion
- Update SKILL.md: drop ~/.zshrc references, point to tools/mcc-env.sh and
standalone tools/start-server.sh + tools/mc-rcon.sh; update server path
from ~/Minecraft/Servers/ to MinecraftOfficial/downloads/; replace
`mcc-build` with `dotnet build MinecraftClient.sln -c Release`
- Update evals.json expectation to match new workflow
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/1ff08b70-7be3-4211-9b77-a9e10ff1d157