From dff255da681e72e49719ea33f64ccc5cf28a2c39 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Fri, 2 Nov 2018 17:19:57 +0100 Subject: [PATCH] rename mapping headers --- .../net/fabricmc/loom/AbstractPlugin.java | 6 ++--- .../loom/mixin/ObfuscationServiceFabric.java | 24 +++++++++---------- .../net/fabricmc/loom/task/MapJarsTiny.java | 6 ++--- .../net/fabricmc/loom/util/ModProcessor.java | 2 +- .../net/fabricmc/loom/util/ModRemapper.java | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main/java/net/fabricmc/loom/AbstractPlugin.java b/src/main/java/net/fabricmc/loom/AbstractPlugin.java index 14f9aa2..68048bb 100644 --- a/src/main/java/net/fabricmc/loom/AbstractPlugin.java +++ b/src/main/java/net/fabricmc/loom/AbstractPlugin.java @@ -108,14 +108,14 @@ public class AbstractPlugin implements Plugin { javaCompileTask.getClasspath().add(project.getConfigurations().getByName(Constants.CONFIG_MINECRAFT)); javaCompileTask.getClasspath().add(target.files(this.getClass().getProtectionDomain().getCodeSource().getLocation())); - javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFilePomfIntermediary=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath()); - javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFilePomfIntermediary=" + Constants.MAPPINGS_MIXIN_EXPORT.get(extension).getCanonicalPath()); + javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFileNamedIntermediary=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath()); + javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFileNamedIntermediary=" + 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:intermediary"); + javaCompileTask.getOptions().getCompilerArgs().add("-AdefaultObfuscationEnv=named:intermediary"); } catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/net/fabricmc/loom/mixin/ObfuscationServiceFabric.java b/src/main/java/net/fabricmc/loom/mixin/ObfuscationServiceFabric.java index fe2bccc..861ac98 100644 --- a/src/main/java/net/fabricmc/loom/mixin/ObfuscationServiceFabric.java +++ b/src/main/java/net/fabricmc/loom/mixin/ObfuscationServiceFabric.java @@ -60,24 +60,24 @@ public class ObfuscationServiceFabric implements IObfuscationService { @Override public Set getSupportedOptions() { ImmutableSet.Builder builder = new ImmutableSet.Builder<>(); - addSupportedOptions(builder, "mojang", "intermediary"); - addSupportedOptions(builder, "mojang", "pomf"); - addSupportedOptions(builder, "intermediary", "mojang"); - addSupportedOptions(builder, "intermediary", "pomf"); - addSupportedOptions(builder, "pomf", "mojang"); - addSupportedOptions(builder, "pomf", "intermediary"); + addSupportedOptions(builder, "official", "intermediary"); + addSupportedOptions(builder, "official", "named"); + addSupportedOptions(builder, "intermediary", "official"); + addSupportedOptions(builder, "intermediary", "named"); + addSupportedOptions(builder, "named", "official"); + addSupportedOptions(builder, "named", "intermediary"); return builder.build(); } @Override public Collection getObfuscationTypes() { return ImmutableSet.of( - createObfuscationType("mojang", "intermediary"), - createObfuscationType("mojang", "pomf"), - createObfuscationType("intermediary", "mojang"), - createObfuscationType("intermediary", "pomf"), - createObfuscationType("pomf", "mojang"), - createObfuscationType("pomf", "intermediary") + createObfuscationType("official", "intermediary"), + createObfuscationType("official", "named"), + createObfuscationType("intermediary", "official"), + createObfuscationType("intermediary", "named"), + createObfuscationType("named", "official"), + createObfuscationType("named", "intermediary") ); } } diff --git a/src/main/java/net/fabricmc/loom/task/MapJarsTiny.java b/src/main/java/net/fabricmc/loom/task/MapJarsTiny.java index d5dd622..e2ac534 100644 --- a/src/main/java/net/fabricmc/loom/task/MapJarsTiny.java +++ b/src/main/java/net/fabricmc/loom/task/MapJarsTiny.java @@ -40,7 +40,7 @@ import java.util.Arrays; public class MapJarsTiny { public void mapJars(MapJarsTask task) throws IOException { - String fromM = "mojang"; + String fromM = "official"; Path mappings = task.getMappingFile().toPath(); Path[] classpath = task.getMapperPaths().stream() @@ -51,8 +51,8 @@ public class MapJarsTiny { Path outputMapped = task.getMappedJar().toPath(); Path outputIntermediary = task.getIntermediaryJar().toPath(); - for (String toM : Arrays.asList("pomf", "intermediary")) { - Path output = "pomf".equals(toM) ? outputMapped : outputIntermediary; + for (String toM : Arrays.asList("named", "intermediary")) { + Path output = "named".equals(toM) ? outputMapped : outputIntermediary; task.getLogger().lifecycle(":remapping minecraft (TinyRemapper, " + fromM + " -> " + toM + ")"); diff --git a/src/main/java/net/fabricmc/loom/util/ModProcessor.java b/src/main/java/net/fabricmc/loom/util/ModProcessor.java index 8ede308..5024dda 100644 --- a/src/main/java/net/fabricmc/loom/util/ModProcessor.java +++ b/src/main/java/net/fabricmc/loom/util/ModProcessor.java @@ -75,7 +75,7 @@ public class ModProcessor { private static void remapJar(File input, File output, Project project){ LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class); String fromM = "intermediary"; - String toM = "pomf"; + String toM = "named"; File mappingsFile = Constants.MAPPINGS_TINY.get(extension); Path mappings = mappingsFile.toPath(); diff --git a/src/main/java/net/fabricmc/loom/util/ModRemapper.java b/src/main/java/net/fabricmc/loom/util/ModRemapper.java index abcd8fd..187e137 100644 --- a/src/main/java/net/fabricmc/loom/util/ModRemapper.java +++ b/src/main/java/net/fabricmc/loom/util/ModRemapper.java @@ -64,7 +64,7 @@ public class ModRemapper { Path mappings = Constants.MAPPINGS_TINY.get(extension).toPath(); - String fromM = "pomf"; + String fromM = "named"; String toM = "intermediary"; List classpathFiles = new ArrayList<>();