diff options
| author | 2015-02-28 18:00:25 -0500 | |
|---|---|---|
| committer | 2015-02-28 18:00:25 -0500 | |
| commit | 741e3472f76d959645ee0e025547d69a03e5b6f2 (patch) | |
| tree | da17641de8b891721e435636edbf7a5077d9e6ec /src/cuchaz/enigma/convert/ClassNamer.java | |
| parent | ignore more harmless exceptions from the buggy highlight painter system (diff) | |
| download | enigma-fork-741e3472f76d959645ee0e025547d69a03e5b6f2.tar.gz enigma-fork-741e3472f76d959645ee0e025547d69a03e5b6f2.tar.xz enigma-fork-741e3472f76d959645ee0e025547d69a03e5b6f2.zip | |
fix up conversion tool to handle Minecraft 1.8.3
Diffstat (limited to 'src/cuchaz/enigma/convert/ClassNamer.java')
| -rw-r--r-- | src/cuchaz/enigma/convert/ClassNamer.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cuchaz/enigma/convert/ClassNamer.java b/src/cuchaz/enigma/convert/ClassNamer.java index 1b6e81c..6423a18 100644 --- a/src/cuchaz/enigma/convert/ClassNamer.java +++ b/src/cuchaz/enigma/convert/ClassNamer.java | |||
| @@ -15,6 +15,8 @@ import java.util.Map; | |||
| 15 | import com.google.common.collect.BiMap; | 15 | import com.google.common.collect.BiMap; |
| 16 | import com.google.common.collect.Maps; | 16 | import com.google.common.collect.Maps; |
| 17 | 17 | ||
| 18 | import cuchaz.enigma.mapping.ClassEntry; | ||
| 19 | |||
| 18 | public class ClassNamer { | 20 | public class ClassNamer { |
| 19 | 21 | ||
| 20 | public interface SidedClassNamer { | 22 | public interface SidedClassNamer { |
| @@ -24,15 +26,15 @@ public class ClassNamer { | |||
| 24 | private Map<String,String> m_sourceNames; | 26 | private Map<String,String> m_sourceNames; |
| 25 | private Map<String,String> m_destNames; | 27 | private Map<String,String> m_destNames; |
| 26 | 28 | ||
| 27 | public ClassNamer(BiMap<ClassIdentity,ClassIdentity> mappings) { | 29 | public ClassNamer(BiMap<ClassEntry,ClassEntry> mappings) { |
| 28 | // convert the identity mappings to name maps | 30 | // convert the identity mappings to name maps |
| 29 | m_sourceNames = Maps.newHashMap(); | 31 | m_sourceNames = Maps.newHashMap(); |
| 30 | m_destNames = Maps.newHashMap(); | 32 | m_destNames = Maps.newHashMap(); |
| 31 | int i = 0; | 33 | int i = 0; |
| 32 | for (Map.Entry<ClassIdentity,ClassIdentity> entry : mappings.entrySet()) { | 34 | for (Map.Entry<ClassEntry,ClassEntry> entry : mappings.entrySet()) { |
| 33 | String name = String.format("M%04d", i++); | 35 | String name = String.format("M%04d", i++); |
| 34 | m_sourceNames.put(entry.getKey().getClassEntry().getName(), name); | 36 | m_sourceNames.put(entry.getKey().getName(), name); |
| 35 | m_destNames.put(entry.getValue().getClassEntry().getName(), name); | 37 | m_destNames.put(entry.getValue().getName(), name); |
| 36 | } | 38 | } |
| 37 | } | 39 | } |
| 38 | 40 | ||