No longer use sponges own tweak class, run client task now uses the obfed jar.

dev/0.11
modmuss50 2018-05-14 21:29:48 +01:00
parent 66c043f171
commit 5546d876fb
3 changed files with 4 additions and 6 deletions

View File

@ -140,7 +140,7 @@ public class GenIdeaProjectTask extends DefaultTask {
ideaClient.configName = "Minecraft Client"; ideaClient.configName = "Minecraft Client";
ideaClient.runDir = "file://$PROJECT_DIR$/" + extension.runDir; ideaClient.runDir = "file://$PROJECT_DIR$/" + extension.runDir;
ideaClient.vmArgs = "-Djava.library.path=" + Constants.MINECRAFT_NATIVES.get(extension).getAbsolutePath() + " -Dfabric.development=true"; ideaClient.vmArgs = "-Djava.library.path=" + Constants.MINECRAFT_NATIVES.get(extension).getAbsolutePath() + " -Dfabric.development=true";
ideaClient.programArgs = "--tweakClass com.openmodloader.loader.launch.OpenClientTweaker --tweakClass org.spongepowered.asm.launch.MixinTweaker --assetIndex " + version.assetIndex.id + " --assetsDir " + new File(extension.getUserCache(), "assets-" + extension.version).getAbsolutePath(); ideaClient.programArgs = "--tweakClass com.openmodloader.loader.launch.OpenClientTweaker --assetIndex " + version.assetIndex.id + " --assetsDir " + new File(extension.getUserCache(), "assets-" + extension.version).getAbsolutePath();
runManager.appendChild(ideaClient.genRuns(runManager)); runManager.appendChild(ideaClient.genRuns(runManager));
@ -150,7 +150,7 @@ public class GenIdeaProjectTask extends DefaultTask {
ideaServer.configName = "Minecraft Server"; ideaServer.configName = "Minecraft Server";
ideaServer.runDir = "file://$PROJECT_DIR$/" + extension.runDir; ideaServer.runDir = "file://$PROJECT_DIR$/" + extension.runDir;
ideaServer.vmArgs = "-Dfabric.development=true"; ideaServer.vmArgs = "-Dfabric.development=true";
ideaServer.programArgs = "--tweakClass com.openmodloader.loader.launch.OpenServerTweaker --tweakClass org.spongepowered.asm.launch.MixinTweaker"; ideaServer.programArgs = "--tweakClass com.openmodloader.loader.launch.OpenServerTweaker";
runManager.appendChild(ideaServer.genRuns(runManager)); runManager.appendChild(ideaServer.genRuns(runManager));

View File

@ -65,10 +65,10 @@ public class RunClientTask extends JavaExec {
libs.add(file.getAbsolutePath()); libs.add(file.getAbsolutePath());
} }
} }
libs.add(Constants.MINECRAFT_FINAL_JAR.get(extension).getAbsolutePath()); libs.add(Constants.MINECRAFT_CLIENT_JAR.get(extension).getAbsolutePath());
classpath(libs); classpath(libs);
args("--tweakClass", "com.openmodloader.loader.launch.OpenClientTweaker", "--tweakClass", "org.spongepowered.asm.launch.MixinTweaker", "--assetIndex", version.assetIndex.id, "--assetsDir", new File(extension.getUserCache(), "assets-" + extension.version).getAbsolutePath()); args("--tweakClass", "com.openmodloader.loader.launch.OpenClientTweaker", "--assetIndex", version.assetIndex.id, "--assetsDir", new File(extension.getUserCache(), "assets-" + extension.version).getAbsolutePath());
setWorkingDir(new File(getProject().getRootDir(), "run")); setWorkingDir(new File(getProject().getRootDir(), "run"));
@ -85,7 +85,6 @@ public class RunClientTask extends JavaExec {
LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class); LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class);
List<String> args = new ArrayList<>(); List<String> args = new ArrayList<>();
args.add("-Djava.library.path=" + Constants.MINECRAFT_NATIVES.get(extension).getAbsolutePath()); args.add("-Djava.library.path=" + Constants.MINECRAFT_NATIVES.get(extension).getAbsolutePath());
args.add("-Dfabric.development=true");
args.add("-XstartOnFirstThread"); //Fixes lwjgl starting on an incorrect thread args.add("-XstartOnFirstThread"); //Fixes lwjgl starting on an incorrect thread
return args; return args;
} }

View File

@ -66,7 +66,6 @@ public class RunServerTask extends JavaExec {
classpath(libs); classpath(libs);
args("--tweakClass", "com.openmodloader.loader.launch.OpenServerTweaker"); args("--tweakClass", "com.openmodloader.loader.launch.OpenServerTweaker");
args("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker");
setWorkingDir(new File(getProject().getRootDir(), "run")); setWorkingDir(new File(getProject().getRootDir(), "run"));