mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Optimize cold start speed and block loading speed
This commit is contained in:
parent
01ef9a89ca
commit
58eafdfd5c
8 changed files with 147 additions and 127 deletions
|
|
@ -16,6 +16,7 @@ using MinecraftClient.WinAPI;
|
|||
using MinecraftClient.Protocol.Keys;
|
||||
using System.Security.Cryptography;
|
||||
using System.Xml.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MinecraftClient
|
||||
{
|
||||
|
|
@ -84,9 +85,12 @@ namespace MinecraftClient
|
|||
//Take advantage of Windows 10 / Mac / Linux UTF-8 console
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
// If we're on windows, check if our version is Win10 or greater.
|
||||
if (WindowsVersion.WinMajorVersion >= 10)
|
||||
Console.OutputEncoding = Console.InputEncoding = Encoding.UTF8;
|
||||
Parallel.Invoke(() =>
|
||||
{
|
||||
// If we're on windows, check if our version is Win10 or greater.
|
||||
if (WindowsVersion.WinMajorVersion >= 10)
|
||||
Console.OutputEncoding = Console.InputEncoding = Encoding.UTF8;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue