From 655c77c3a1567d341b388092fc63301738ff81f7 Mon Sep 17 00:00:00 2001 From: AlphaBs Date: Sat, 9 Mar 2024 19:03:53 +0900 Subject: [PATCH] feat: increase default MaximumRamMb value to 2048 --- CmlLib/Core/Launcher/MLaunchOption.cs | 14 +++++++++++++- CmlLibCoreSample/Program.cs | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CmlLib/Core/Launcher/MLaunchOption.cs b/CmlLib/Core/Launcher/MLaunchOption.cs index 84a252d..a528cc1 100644 --- a/CmlLib/Core/Launcher/MLaunchOption.cs +++ b/CmlLib/Core/Launcher/MLaunchOption.cs @@ -6,13 +6,25 @@ namespace CmlLib.Core { public class MLaunchOption { + public MLaunchOption() + { + if (MRule.Arch == "64") + { + MaximumRamMb = 2048; + } + else + { + MaximumRamMb = 1024; + } + } + public MinecraftPath? Path { get; set; } public MVersion? StartVersion { get; set; } public MSession? Session { get; set; } public string? JavaVersion { get; set; } public string? JavaPath { get; set; } - public int MaximumRamMb { get; set; } = 1024; + public int MaximumRamMb { get; set; } public int MinimumRamMb { get; set; } public string[]? JVMArguments { get; set; } diff --git a/CmlLibCoreSample/Program.cs b/CmlLibCoreSample/Program.cs index 74b37d1..da7ab28 100644 --- a/CmlLibCoreSample/Program.cs +++ b/CmlLibCoreSample/Program.cs @@ -65,9 +65,9 @@ void Start(MSession session) var launchOption = new MLaunchOption { - MaximumRamMb = 1024, Session = session, - + + //MaximumRamMb = 2048, //ScreenWidth = 1600, //ScreenHeight = 900, //ServerIp = "mc.hypixel.net",