@@ -13,7 +13,7 @@ import (
1313 "github.com/autoinst/AutoInstall/core"
1414)
1515
16- func SPCInstall (file string , MaxConnections int , Argsment string ) {
16+ func SPCInstall (file string , MaxCon int , Args string ) {
1717 if strings .HasSuffix (file , ".zip" ) {
1818 zipFile , err := zip .OpenReader (file )
1919 if err != nil {
@@ -63,8 +63,8 @@ func SPCInstall(file string, MaxConnections int, Argsment string) {
6363 Loader : strings .ToLower (strings .ToLower (vars ["MODLOADER" ])),
6464 LoaderVersion : vars ["MODLOADER_VERSION" ],
6565 Download : "bmclapi" ,
66- MaxConnections : MaxConnections ,
67- Argsment : Argsment ,
66+ MaxConnections : 32 ,
67+ Argsment : "-Xmx{maxmen}M -Xms{maxmen}M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true" ,
6868 }
6969 jsonData , err := json .MarshalIndent (instConfig , "" , " " )
7070 if err != nil {
@@ -78,7 +78,6 @@ func SPCInstall(file string, MaxConnections int, Argsment string) {
7878 }
7979}
8080
81- // readVariables 读取 variables.txt 文件并解析为 map
8281func readVariables (filePath string ) (map [string ]string , error ) {
8382 file , err := os .Open (filePath )
8483 if err != nil {
0 commit comments