mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-23 12:05:44 +01:00
Add flag in version info: loader should override version arguments
Fixes #4
This commit is contained in:
parent
b9fc461063
commit
e22e70ea81
@ -54,6 +54,10 @@ public class ModernForgeLoaderProcessor implements ILoaderProcessor {
|
||||
// Copy game arguments
|
||||
List<GameArgument> gameArguments = info.getArguments().getGameArguments();
|
||||
if (gameArguments != null) {
|
||||
if (info.isOverridingArguments()) {
|
||||
version.getArguments().getGameArguments().clear();
|
||||
}
|
||||
|
||||
version.getArguments().getGameArguments().addAll(gameArguments);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
package com.skcraft.launcher.model.loader;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.skcraft.launcher.model.minecraft.GameArgument;
|
||||
@ -24,6 +25,8 @@ public class VersionInfo {
|
||||
private String mainClass;
|
||||
private List<Library> libraries;
|
||||
|
||||
@JsonIgnore private transient boolean overridingArguments;
|
||||
|
||||
public void setMinecraftArguments(String argumentString) {
|
||||
MinecraftArguments minecraftArguments = new MinecraftArguments();
|
||||
minecraftArguments.setGameArguments(new ArrayList<GameArgument>());
|
||||
@ -33,5 +36,6 @@ public class VersionInfo {
|
||||
}
|
||||
|
||||
setArguments(minecraftArguments);
|
||||
setOverridingArguments(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user