Skip to content

Commit

Permalink
Add --levelsDir
Browse files Browse the repository at this point in the history
  • Loading branch information
Lassebq committed Oct 30, 2024
1 parent ced6e27 commit 05b08d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ Arguments may be as follows:
- `icon` - List of paths of icon PNGs separated by file system path separator (";" on windows, ":" on unix)
- `applet` - Makes the game think you're running an applet which:
- Removes quit button in versions between Beta 1.0 and release 1.5.2
- Changes mouse input code in classic
- `survival` - Patches classic creative versions to start in survival
- `creative` - Patches classic survival versions to start in creative
- Changes mouse input code in Classic
- `levelsDir` - Where to save Classic and Indev levels
- `survival` - Patches Classic creative versions to start in survival
- `creative` - Patches Classic survival versions to start in creative
- `oneSixFlag` - Toggles notice about the release of 1.6 in 1.5.2
- `serverSHA1` - Compare minecraft_server.jar in .minecraft/server against this hash
- `serverURL` - URL to download the server from if the hash is mismatched or the jar is missing
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/mcphackers/launchwrapper/LaunchConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class LaunchConfig {
private final LaunchParameterSwitch awtFrame = new LaunchParameterSwitchReverse("awtFrame", lwjglFrame);
public final LaunchParameterEnum<SkinType> skinProxy = new LaunchParameterEnum<SkinType>("skinProxy", SkinType.DEFAULT, true);
public final LaunchParameterSkinOptions skinOptions = new LaunchParameterSkinOptions("skinOptions");
public final LaunchParameterFile levelsDir = new LaunchParameterFile("levelsDir", new File(DEFAULT_GAME_DIR, "levels"), true);
public final LaunchParameterSwitch isom = new LaunchParameterSwitch("isom", false, true);
public final LaunchParameterFileList icon = new LaunchParameterFileList("icon", null, true);
public final LaunchParameterString title = new LaunchParameterString("title", null, true);
Expand All @@ -65,8 +66,8 @@ public class LaunchConfig {
public final LaunchParameterSwitch applet = new LaunchParameterSwitch("applet", false);
public final LaunchParameterSwitch oneSixFlag = new LaunchParameterSwitch("oneSixFlag", false, true);
public final LaunchParameterSwitch unlicensedCopy = new LaunchParameterSwitchReverse("unlicensedCopy", haspaid);
public final LaunchParameterSwitch creative = new LaunchParameterSwitch("creative", false);
public final LaunchParameterSwitch survival = new LaunchParameterSwitch("survival", false);
public final LaunchParameterSwitch creative = new LaunchParameterSwitch("creative", false, true);
public final LaunchParameterSwitch survival = new LaunchParameterSwitch("survival", false, true);
public final LaunchParameterString serverURL = new LaunchParameterString("serverURL", null, true);
public final LaunchParameterString serverSHA1 = new LaunchParameterString("serverSHA1", null, true);
// clang-format on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public LegacyURLStreamHandler(LaunchConfig config) {
this.config = config;
this.assets = new AssetRequests(config.assetsDir.get(), config.assetIndex.get());
this.skins = new SkinRequests(config.gameDir.get(), config.skinOptions.get(), config.skinProxy.get());
this.levelSaveDir = new File(config.gameDir.get(), "levels");
this.levelSaveDir = config.levelsDir.get();
}

@Override
Expand Down

0 comments on commit 05b08d7

Please sign in to comment.