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 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>
- Rewrite Json.cs to use System.Text.Json.Nodes (JsonNode, JsonObject, JsonArray)
- Add JsonNodeExtensions.GetStringValue() for backward-compatible string access
- Update all 14 consumer files to use the new JsonNode API
- Remove ~300 lines of hand-rolled JSON parsing code from 2013
- Replace KeyUtils.EscapeString with delegation to Json.EscapeString
Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/milutinke/Minecraft-Console-Client/sessions/afcd1b7b-ea23-4a0d-bb46-a90b623406fc
* Update CI to detect the word "skipci"
* Make script compilation errors more verbose
Rather than just giving the line in which the error has been found, return the actual text content of the line itself
* Attempt to bubble up errors in the script chain, so it says the reason for any NotRun errors.
The exception message gets eaten up when the script is running, and an exception happens.
Also put in a default result message for the CmdResult, instead of having it default to null.
* Trim the whitespace off returned script compilation error line
Added Farm bot crops handling for 1.20/.1
Added utilities for Containers/Inventories
Added bot movement lock to prevent multiple bots that use movements from running at the same time.
General code improvements.
Added ChatBot method for enchantments.
Changed the how the list of enchantments looks, now looks cleaner + has Roman numbers.
Added safe guards to the echant command.
This fixes bugs in the scripting system in which scripts does not compile and run on Linux.
This commit also changes wording around the logging in the scripting system to avoid confusion between script errors and regular script compilation.