diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/mapping/MappingsEnigmaWriter.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/mapping/MappingsEnigmaWriter.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/MappingsEnigmaWriter.java b/src/main/java/cuchaz/enigma/mapping/MappingsEnigmaWriter.java index e1763d0..9589689 100644 --- a/src/main/java/cuchaz/enigma/mapping/MappingsEnigmaWriter.java +++ b/src/main/java/cuchaz/enigma/mapping/MappingsEnigmaWriter.java | |||
| @@ -110,9 +110,9 @@ public class MappingsEnigmaWriter { | |||
| 110 | 110 | ||
| 111 | private void write(PrintWriter out, ClassMapping classMapping, int depth) throws IOException { | 111 | private void write(PrintWriter out, ClassMapping classMapping, int depth) throws IOException { |
| 112 | if (classMapping.getDeobfName() == null) { | 112 | if (classMapping.getDeobfName() == null) { |
| 113 | out.format("%sCLASS %s\n", getIndent(depth), classMapping.getObfFullName()); | 113 | out.format("%sCLASS %s%s\n", getIndent(depth), classMapping.getObfFullName(), classMapping.getModifier() == Mappings.EntryModifier.UNCHANGED ? "" : classMapping.getModifier().getFormattedName()); |
| 114 | } else { | 114 | } else { |
| 115 | out.format("%sCLASS %s %s\n", getIndent(depth), classMapping.getObfFullName(), classMapping.getDeobfName()); | 115 | out.format("%sCLASS %s %s%s\n", getIndent(depth), classMapping.getObfFullName(), classMapping.getDeobfName(), classMapping.getModifier() == Mappings.EntryModifier.UNCHANGED ? "" : classMapping.getModifier().getFormattedName()); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | for (ClassMapping innerClassMapping : sorted(classMapping.innerClasses())) { | 118 | for (ClassMapping innerClassMapping : sorted(classMapping.innerClasses())) { |
| @@ -129,14 +129,17 @@ public class MappingsEnigmaWriter { | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | private void write(PrintWriter out, FieldMapping fieldMapping, int depth) throws IOException { | 131 | private void write(PrintWriter out, FieldMapping fieldMapping, int depth) throws IOException { |
| 132 | out.format("%sFIELD %s %s %s\n", getIndent(depth), fieldMapping.getObfName(), fieldMapping.getDeobfName(), fieldMapping.getObfType().toString()); | 132 | if (fieldMapping.getDeobfName() == null) |
| 133 | out.format("%sFIELD %s %s%s\n", getIndent(depth), fieldMapping.getObfName(), fieldMapping.getObfType().toString(), fieldMapping.getModifier() == Mappings.EntryModifier.UNCHANGED ? "" : fieldMapping.getModifier().getFormattedName()); | ||
| 134 | else | ||
| 135 | out.format("%sFIELD %s %s %s%s\n", getIndent(depth), fieldMapping.getObfName(), fieldMapping.getDeobfName(), fieldMapping.getObfType().toString(), fieldMapping.getModifier() == Mappings.EntryModifier.UNCHANGED ? "" : fieldMapping.getModifier().getFormattedName()); | ||
| 133 | } | 136 | } |
| 134 | 137 | ||
| 135 | private void write(PrintWriter out, MethodMapping methodMapping, int depth) throws IOException { | 138 | private void write(PrintWriter out, MethodMapping methodMapping, int depth) throws IOException { |
| 136 | if (methodMapping.getDeobfName() == null) { | 139 | if (methodMapping.getDeobfName() == null) { |
| 137 | out.format("%sMETHOD %s %s\n", getIndent(depth), methodMapping.getObfName(), methodMapping.getObfSignature()); | 140 | out.format("%sMETHOD %s %s%s\n", getIndent(depth), methodMapping.getObfName(), methodMapping.getObfSignature(), methodMapping.getModifier() == Mappings.EntryModifier.UNCHANGED ? "" :methodMapping.getModifier().getFormattedName()); |
| 138 | } else { | 141 | } else { |
| 139 | out.format("%sMETHOD %s %s %s\n", getIndent(depth), methodMapping.getObfName(), methodMapping.getDeobfName(), methodMapping.getObfSignature()); | 142 | out.format("%sMETHOD %s %s %s%s\n", getIndent(depth), methodMapping.getObfName(), methodMapping.getDeobfName(), methodMapping.getObfSignature(), methodMapping.getModifier() == Mappings.EntryModifier.UNCHANGED ? "" : methodMapping.getModifier().getFormattedName()); |
| 140 | } | 143 | } |
| 141 | 144 | ||
| 142 | for (ArgumentMapping argumentMapping : sorted(methodMapping.arguments())) { | 145 | for (ArgumentMapping argumentMapping : sorted(methodMapping.arguments())) { |