Skip to content

Commit e8d3d07

Browse files
committed
Fix game dir not resolving properly + move "Strip source file" to reobfuscate section
1 parent 65b6eab commit e8d3d07

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gui/src/main/java/org/mcphackers/mcp/main/MainGUI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public class MainGUI extends MCP {
5858
public static final TaskMode[] TASKS = {TaskMode.DECOMPILE, TaskMode.RECOMPILE, TaskMode.REOBFUSCATE, TaskMode.BUILD, TaskMode.UPDATE_MD5, TaskMode.CREATE_PATCH};
5959
public static final String[] TABS = {"task.decompile", "task.recompile", "task.reobfuscate", "task.build", "options.running"};
6060
public static final TaskParameter[][] TAB_PARAMETERS = {
61-
{TaskParameter.PATCHES, TaskParameter.FERNFLOWER_OPTIONS, TaskParameter.IGNORED_PACKAGES, TaskParameter.OUTPUT_SRC, TaskParameter.DECOMPILE_RESOURCES, TaskParameter.GUESS_GENERICS, TaskParameter.STRIP_GENERICS, TaskParameter.STRIP_SOURCE_FILE},
62-
{TaskParameter.SOURCE_VERSION, TaskParameter.TARGET_VERSION, TaskParameter.JAVA_HOME}, {TaskParameter.OBFUSCATION, TaskParameter.SRG_OBFUSCATION, TaskParameter.EXCLUDED_CLASSES},
61+
{TaskParameter.PATCHES, TaskParameter.FERNFLOWER_OPTIONS, TaskParameter.IGNORED_PACKAGES, TaskParameter.OUTPUT_SRC, TaskParameter.DECOMPILE_RESOURCES, TaskParameter.GUESS_GENERICS, TaskParameter.STRIP_GENERICS},
62+
{TaskParameter.SOURCE_VERSION, TaskParameter.TARGET_VERSION, TaskParameter.JAVA_HOME}, {TaskParameter.OBFUSCATION, TaskParameter.SRG_OBFUSCATION, TaskParameter.EXCLUDED_CLASSES, TaskParameter.STRIP_SOURCE_FILE},
6363
{TaskParameter.FULL_BUILD}, {TaskParameter.RUN_BUILD, TaskParameter.RUN_ARGS, TaskParameter.GAME_ARGS}
6464
};
6565
public Theme theme = Theme.THEMES_MAP.get(UIManager.getCrossPlatformLookAndFeelClassName());

src/main/java/org/mcphackers/mcp/tasks/TaskRun.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.io.IOException;
77
import java.nio.file.Files;
88
import java.nio.file.Path;
9+
import java.nio.file.Paths;
910
import java.util.ArrayList;
1011
import java.util.Arrays;
1112
import java.util.Collections;
@@ -199,6 +200,9 @@ public static List<String> getLaunchArgs(MCP mcp, Side side) {
199200
}
200201

201202
public static Path getMCDir(MCP mcp, Side side) {
203+
if (Side.CLIENT.equals(side)) {
204+
return Paths.get(".");
205+
}
202206
return MCPPaths.get(mcp, MCPPaths.PROJECT, side).relativize(MCPPaths.get(mcp, GAMEDIR, side));
203207
}
204208

0 commit comments

Comments
 (0)