Skip to content

Commit 5f38645

Browse files
authored
Merge pull request #219 from natowb/main
fix: fixed the apply patches stage in the GUI
2 parents cacda16 + b5cdc7c commit 5f38645

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/main/java/org/mcphackers/mcp/MCPPaths.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ public class MCPPaths {
3737
public static final String MAPPINGS = CONF + "mappings.tiny";
3838
public static final String EXC = CONF + "exceptions.exc";
3939
public static final String ACCESS = CONF + "%s.access";
40-
public static final String PATCHES = CONF + "%s.patch";
40+
public static final String PATCHES = "patches/%s.patch";
4141
public static final String VERSION = CONF + "version.json";
4242

43-
public static final String PATCH = "patches/%s.patch";
4443

4544
public static final String UPDATE_JAR = "update.jar";
4645

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.mcphackers.mcp.tasks;
22

3-
import static org.mcphackers.mcp.MCPPaths.PATCH;
3+
import static org.mcphackers.mcp.MCPPaths.PATCHES;
44
import static org.mcphackers.mcp.MCPPaths.SOURCE;
55

66
import java.io.ByteArrayOutputStream;
@@ -23,7 +23,7 @@ public TaskApplyPatch(Side side, MCP instance) {
2323
protected Stage[] setStages() {
2424
return new Stage[] {
2525
stage(getLocalizedStage("patching"), 0, () -> {
26-
final Path patchesPath = MCPPaths.get(mcp, PATCH, side);
26+
final Path patchesPath = MCPPaths.get(mcp, PATCHES, side);
2727
final Path srcPath = MCPPaths.get(mcp, SOURCE, side);
2828
patch(this, srcPath, srcPath, patchesPath);
2929
})

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected Stage[] setStages() {
2121
stage(getLocalizedStage("createpatch"), 0, () -> {
2222
Path srcPathUnpatched = MCPPaths.get(mcp, SOURCE_UNPATCHED, side);
2323
Path srcPathPatched = MCPPaths.get(mcp, SOURCE, side);
24-
Path patchesOut = MCPPaths.get(mcp, PATCH, side);
24+
Path patchesOut = MCPPaths.get(mcp, PATCHES, side);
2525
setProgress(getLocalizedStage("createpatch"));
2626
if (!Files.exists(srcPathPatched)) {
2727
throw new IOException("Patched " + side.name + " sources cannot be found!");

src/main/java/org/mcphackers/mcp/tasks/mode/TaskMode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public class TaskMode {
139139
.setName("applypatch")
140140
.setTaskClass(TaskApplyPatch.class)
141141
.setProgressBars(false)
142-
.addRequirement((mcp, side) -> Files.isReadable(MCPPaths.get(mcp, MCPPaths.PATCH, side))
142+
.addRequirement((mcp, side) -> Files.isReadable(MCPPaths.get(mcp, MCPPaths.PATCHES, side))
143143
&& Files.isReadable(MCPPaths.get(mcp, MCPPaths.SOURCE, side)))
144144
.setParameters(new TaskParameter[]{
145145
TaskParameter.SIDE

0 commit comments

Comments
 (0)