From de42109771e2de579d8d1a4764ea802984d21e04 Mon Sep 17 00:00:00 2001 From: wagyourtail Date: Tue, 6 Jul 2021 15:59:06 -0600 Subject: [PATCH] add check --- buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java index 6c3635a80..68387fc00 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java @@ -89,7 +89,6 @@ public class ProguardTask extends BaritoneGradleTask { private void copyMcJar() throws IOException { File mcClientJar = this.getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("launch").getRuntimeClasspath().getFiles() .stream() - //this line will change when using official mappings in 1.17 .filter(f -> f.getName().startsWith("minecraft-")) .map(f -> { switch (compType) { @@ -104,6 +103,7 @@ public class ProguardTask extends BaritoneGradleTask { }) .findFirst() .get(); + if (!mcClientJar.exists()) throw new IOException("Failed to find minecraft! " + mcClientJar.getAbsolutePath()); if (!copyMcTargetDir.exists() && !copyMcTargetDir.mkdirs()) throw new IOException("Failed to create target for copyMcJar"); Files.copy(mcClientJar.toPath(), copyMcTargetJar.toPath(), REPLACE_EXISTING); }