Changed default RAM limit
This commit is contained in:
parent
8208434b8f
commit
ad736787e9
@ -191,7 +191,7 @@ func GetVersionMetadata(wantedVersion string) (McMetadata, error) {
|
||||
defer f.Close()
|
||||
if data, err := io.ReadAll(f); err == nil {
|
||||
sha := sha1.Sum(data)
|
||||
if hex.EncodeToString(sha[:20]) == version.Sha1{
|
||||
if hex.EncodeToString(sha[:20]) == version.Sha1 {
|
||||
metadata := McMetadata{}
|
||||
json.Unmarshal(data, &metadata)
|
||||
return metadata, nil
|
||||
@ -415,7 +415,7 @@ func DownloadLibraries(mcVersion string, libPath string, a App) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func InstallNatives(mcVersion string, nativesDir string){
|
||||
func InstallNatives(mcVersion string, nativesDir string) {
|
||||
metadata, _ := GetVersionMetadata(mcVersion)
|
||||
for _, lib := range metadata.Libraries {
|
||||
if lib.Natives != nil {
|
||||
@ -446,7 +446,7 @@ func InstallNatives(mcVersion string, nativesDir string){
|
||||
}
|
||||
}
|
||||
|
||||
func DownloadLoggingConfig(mcVersion string, gameDir string){
|
||||
func DownloadLoggingConfig(mcVersion string, gameDir string) {
|
||||
metadata, _ := GetVersionMetadata(mcVersion)
|
||||
resp, err := http.Get(metadata.Logging.Client.File.Url)
|
||||
if err != nil {
|
||||
@ -540,7 +540,7 @@ func GetBaseLaunchArgs(mcVersion string, instance Instance, libDir string, binDi
|
||||
args = append(args, loggingArg)
|
||||
}
|
||||
args = append(args, "-Xms512m")
|
||||
args = append(args, "-Xmx1024m")
|
||||
args = append(args, "-Xmx4096m")
|
||||
args = append(args, "-cp")
|
||||
arg := ""
|
||||
separater := ":"
|
||||
@ -556,8 +556,6 @@ func GetBaseLaunchArgs(mcVersion string, instance Instance, libDir string, binDi
|
||||
arg += filepath.Join(binDir, mcVersion, "client.jar")
|
||||
args = append(args, arg)
|
||||
|
||||
|
||||
|
||||
args = append(args, instance.MainClass)
|
||||
|
||||
for _, val := range searchArgs {
|
||||
@ -586,7 +584,6 @@ func GetBaseLaunchArgs(mcVersion string, instance Instance, libDir string, binDi
|
||||
return args, nil
|
||||
}
|
||||
|
||||
|
||||
func GetOfflineLaunchArgs(mcVersion string, instance Instance, libDir string, binDir string, assetDir string, gameDir string, playerName string) ([]string, error) {
|
||||
args, err := GetBaseLaunchArgs(mcVersion, instance, libDir, binDir, assetDir, gameDir)
|
||||
if err != nil {
|
||||
@ -594,7 +591,7 @@ func GetOfflineLaunchArgs(mcVersion string, instance Instance, libDir string, bi
|
||||
}
|
||||
|
||||
for ind, val := range args {
|
||||
switch val{
|
||||
switch val {
|
||||
case "${auth_player_name}":
|
||||
args[ind] = playerName
|
||||
case "${auth_uuid}":
|
||||
@ -617,7 +614,7 @@ func GetOnlineLaunchArgs(mcVersion string, instance Instance, libDir string, bin
|
||||
}
|
||||
|
||||
for ind, val := range args {
|
||||
switch val{
|
||||
switch val {
|
||||
case "${auth_player_name}":
|
||||
args[ind] = auth.Name
|
||||
case "${auth_uuid}":
|
||||
|
Loading…
Reference in New Issue
Block a user