Commit graph

22 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
c7bc25aa17 refactor: convert == null / != null to is null / is not null in 31 files
Replace old-style null comparisons with modern C# pattern matching
syntax across Commands, Protocol, Mapping, ChatBots, Physics,
Inventory, Logger, CommandHandler, Scripting, Crypto, and other modules.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:42:59 +00:00
BruceChen
ff1c570a78 Handle non-interactive terminal environments gracefully
When MCC runs in non-interactive terminals (e.g. CI runners, IDE
embedded shells, piped input), several Console APIs throw exceptions
because there is no real console attached.

Changes:
- Program.cs: Wrap Console.KeyAvailable / Console.ReadKey in
  HandleFailure() with try-catch so MCC does not crash on startup
  failure in headless environments.
- Chunk.cs: Wrap Console.BufferWidth / BufferHeight in try-catch
  with fallback values (120x50) to prevent exceptions when rendering
  chunk maps without a console buffer.
- Map.cs: Same treatment for the map rendering path - use safe
  fallback values when Console.BufferWidth/Height are unavailable.
- ReplayHandler.cs: Replace Array.Reverse() (returns void in newer
  .NET) with .AsEnumerable().Reverse() to fix compilation with
  .NET 10 SDK where the void return breaks the fluent chain.

Made-with: Cursor
2026-03-19 00:11:13 +08:00
BruceChen
7ee08092d4 legacy color support 2022-12-14 14:45:51 +08:00
BruceChen
7900108763 Bug fix 2022-12-11 17:31:37 +08:00
BruceChen
94a3c92b36 Bug fix 2022-12-11 16:30:45 +08:00
BruceChen
84cf749344 Implement command completion suggestions. 2022-12-06 15:50:17 +08:00
BruceChen
f2f88ac009 Merge master into brigadier-dev 2022-10-29 11:44:54 +08:00
BruceChen
077e3a5e9f
Crowdin localization support (#2310)
* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
2022-10-28 11:13:20 +08:00
BruceChen
f8aefaf129 init 2022-10-26 08:54:54 +08:00
BruceChen
89b7110839 Update Map Bot 2022-10-13 19:34:49 +08:00
BruceChen
c1a04fe5bf Bug fix 2022-10-07 21:49:05 +08:00
BruceChen
16c1d1fd77 Refactoring Settings.cs 2022-10-05 15:02:30 +08:00
BruceChen
53898f3446 Fix xxx.Parse 2022-10-04 11:53:07 +08:00
BruceChen
1d52d1eadd
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash
* Fix all warnings
* Remove DotNetZip.
* Fix the usage of HttpClient.
2022-10-02 18:31:08 +08:00
BruceChen
bfd01a5f78 Add non-emoji representation for /chunk status 2022-09-08 14:55:41 +08:00
BruceChen
317f2e78a9 Rewrite adaptation algorithm 2022-09-07 03:04:07 +08:00
BruceChen
7e71fbf241 Bug fix 2022-09-06 23:39:45 +08:00
BruceChen
5cb97ee00b Adaptable width 2022-09-06 23:21:14 +08:00
BruceChen
e69305f4fc Trim 2022-09-06 21:40:44 +08:00
BruceChen
3dac1f41d1 Add tips 2022-09-06 16:10:34 +08:00
BruceChen
c50477a712 Marking chunk 2022-09-06 15:25:27 +08:00
BruceChen
6430f13d3e Add "/chunk status" command 2022-09-06 14:54:49 +08:00