Map mods to intermediary

This commit is contained in:
modmuss50
2018-10-31 13:20:50 +00:00
parent cbdb516d5b
commit 5ca71d9d15
4 changed files with 14 additions and 11 deletions

View File

@@ -103,14 +103,14 @@ public class AbstractPlugin implements Plugin<Project> {
try {
javaCompileTask.getClasspath().add(target.files(this.getClass().getProtectionDomain().getCodeSource().getLocation()));
javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFilePomfMojang=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFilePomfMojang=" + Constants.MAPPINGS_MIXIN_EXPORT.get(extension).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFilePomfIntermediary=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFilePomfIntermediary=" + Constants.MAPPINGS_MIXIN_EXPORT.get(extension).getCanonicalPath());
if(extension.refmapName == null || extension.refmapName.isEmpty()){
project.getLogger().error("Could not find refmap definition, will be using default name: " + project.getName() + "-refmap.json");
extension.refmapName = project.getName() + "-refmap.json";
}
javaCompileTask.getOptions().getCompilerArgs().add("-AoutRefMapFile=" + new File(javaCompileTask.getDestinationDir(), extension.refmapName).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AdefaultObfuscationEnv=pomf:mojang");
javaCompileTask.getOptions().getCompilerArgs().add("-AdefaultObfuscationEnv=pomf:intermediary");
} catch (IOException e) {
e.printStackTrace();
}