mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Merge pull request #3016 from BruceChenQAQ/master
Fix NullReferenceException in ConsoleIO
This commit is contained in:
commit
0d34d5e33d
8 changed files with 7 additions and 18 deletions
|
|
@ -3,7 +3,6 @@ name: csharp-best-practices
|
|||
description: >
|
||||
C# 14 / .NET 10 coding conventions, idiomatic patterns, and performance best practices
|
||||
for the Minecraft Console Client codebase. Use when writing, reviewing, or modifying C# code.
|
||||
version: 0.4.0
|
||||
---
|
||||
|
||||
# C# 14 / .NET 10 Best Practices
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ metadata:
|
|||
- slow
|
||||
- hang
|
||||
- deadlock
|
||||
version: 0.2.0
|
||||
---
|
||||
|
||||
# C#/.NET CLI Optimization
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ metadata:
|
|||
category: technique
|
||||
triggers: performance, allocations, GC, hot path, latency, throughput,
|
||||
memory pressure, optimize, slow, freeze, lag spike, packet processing speed
|
||||
version: 0.2.0
|
||||
---
|
||||
|
||||
# C# Performance Optimization for MCC
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
name: humanizer
|
||||
version: 2.1.1
|
||||
description: |
|
||||
Remove signs of AI-generated writing from text. Use when editing or reviewing
|
||||
text to make it sound more natural and human-written. Based on Wikipedia's
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
---
|
||||
name: writing-skills
|
||||
description: "Use when creating, updating, or improving agent skills."
|
||||
category: meta
|
||||
risk: unknown
|
||||
source: community
|
||||
date_added: "2026-02-27"
|
||||
---
|
||||
|
||||
# Writing Skills (Excellence)
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ namespace MinecraftClient
|
|||
/// </summary>
|
||||
public static void WriteLine(string line)
|
||||
{
|
||||
if (BasicIO)
|
||||
if (BasicIO || Backend is null)
|
||||
Console.WriteLine(line);
|
||||
else
|
||||
Backend.WriteLine(line);
|
||||
|
|
@ -137,7 +137,7 @@ namespace MinecraftClient
|
|||
{
|
||||
str = str.Replace('\n', ' ');
|
||||
}
|
||||
if (BasicIO)
|
||||
if (BasicIO || Backend is null)
|
||||
{
|
||||
if (BasicIO_NoColor)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -161,14 +161,7 @@ namespace MinecraftClient
|
|||
}
|
||||
|
||||
if (configResult.NeedWriteDefault)
|
||||
{
|
||||
Config.Main.Advanced.Language = Settings.GetDefaultGameLanguage();
|
||||
WriteBackSettings(false);
|
||||
}
|
||||
else if (configResult.Success)
|
||||
{
|
||||
WriteBackSettings(true);
|
||||
}
|
||||
|
||||
if (!Config.Main.Advanced.EnableSentry)
|
||||
_sentrySdk?.Dispose();
|
||||
|
|
@ -219,6 +212,8 @@ namespace MinecraftClient
|
|||
|
||||
if (cfg.NeedWriteDefault)
|
||||
{
|
||||
WriteBackSettings(false);
|
||||
|
||||
if (cfg.IsLegacyUpgrade)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§c" + Translations.mcc_use_new_config);
|
||||
|
|
@ -243,6 +238,8 @@ namespace MinecraftClient
|
|||
}
|
||||
else
|
||||
{
|
||||
WriteBackSettings(true);
|
||||
|
||||
if (!Config.Main.Advanced.Language.StartsWith("en"))
|
||||
ConsoleIO.WriteLine(string.Format(Translations.mcc_help_us_translate, Settings.TranslationProjectUrl));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"project_id_env": "CROWDIN_PROJECT_ID"
|
||||
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
|
||||
"base_path": "/"
|
||||
"base_path": "./"
|
||||
"preserve_hierarchy": true
|
||||
"base_url": "https://api.crowdin.com"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue