diff options
| author | 2015-08-02 17:05:01 -0400 | |
|---|---|---|
| committer | 2015-08-02 17:05:01 -0400 | |
| commit | 7744d67e0416e1237c16bf0ddc0605eb5e7c1bb6 (patch) | |
| tree | 1d6fce572fef7e8b482e7b3a62ba75b32ab428e1 /src/cuchaz/enigma/ConvertMain.java | |
| parent | fix up class matcher a bit (diff) | |
| download | enigma-fork-7744d67e0416e1237c16bf0ddc0605eb5e7c1bb6.tar.gz enigma-fork-7744d67e0416e1237c16bf0ddc0605eb5e7c1bb6.tar.xz enigma-fork-7744d67e0416e1237c16bf0ddc0605eb5e7c1bb6.zip | |
fix up converter some more
Diffstat (limited to 'src/cuchaz/enigma/ConvertMain.java')
| -rw-r--r-- | src/cuchaz/enigma/ConvertMain.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cuchaz/enigma/ConvertMain.java b/src/cuchaz/enigma/ConvertMain.java index 068fe5b..1948c84 100644 --- a/src/cuchaz/enigma/ConvertMain.java +++ b/src/cuchaz/enigma/ConvertMain.java | |||
| @@ -44,19 +44,20 @@ public class ConvertMain { | |||
| 44 | // init files | 44 | // init files |
| 45 | String inVer = "1.8.3"; | 45 | String inVer = "1.8.3"; |
| 46 | String outVer = "1.8.8"; | 46 | String outVer = "1.8.8"; |
| 47 | String side = "client"; | ||
| 47 | File home = new File(System.getProperty("user.home")); | 48 | File home = new File(System.getProperty("user.home")); |
| 48 | JarFile sourceJar = new JarFile(new File(home, ".minecraft/versions/" + inVer + "/" + inVer + ".jar")); | 49 | JarFile sourceJar = new JarFile(new File(home, ".minecraft/versions/" + inVer + "/" + inVer + ".jar")); |
| 49 | JarFile destJar = new JarFile(new File(home, ".minecraft/versions/" + outVer + "/" + outVer + ".jar")); | 50 | JarFile destJar = new JarFile(new File(home, ".minecraft/versions/" + outVer + "/" + outVer + ".jar")); |
| 50 | File inMappingsFile = new File("../minecraft-mappings/" + inVer + ".mappings"); | 51 | File inMappingsFile = new File("../Enigma Mappings/" + inVer + "-" + side + ".mappings"); |
| 51 | File outMappingsFile = new File("../minecraft-mappings/" + outVer + ".mappings"); | 52 | File outMappingsFile = new File("../Enigma Mappings/" + outVer + "-" + side + ".mappings"); |
| 52 | Mappings mappings = new MappingsReader().read(new FileReader(inMappingsFile)); | 53 | Mappings mappings = new MappingsReader().read(new FileReader(inMappingsFile)); |
| 53 | File classMatchesFile = new File(inVer + "to" + outVer + ".class.matches"); | 54 | File classMatchesFile = new File(inVer + "to" + outVer + "-" + side + ".class.matches"); |
| 54 | File fieldMatchesFile = new File(inVer + "to" + outVer + ".field.matches"); | 55 | File fieldMatchesFile = new File(inVer + "to" + outVer + "-" + side + ".field.matches"); |
| 55 | File methodMatchesFile = new File(inVer + "to" + outVer + ".method.matches"); | 56 | File methodMatchesFile = new File(inVer + "to" + outVer + "-" + side + ".method.matches"); |
| 56 | 57 | ||
| 57 | // match classes | 58 | // match classes |
| 58 | //computeClassMatches(classMatchesFile, sourceJar, destJar, mappings); | 59 | //computeClassMatches(classMatchesFile, sourceJar, destJar, mappings); |
| 59 | editClasssMatches(classMatchesFile, sourceJar, destJar, mappings); | 60 | //editClasssMatches(classMatchesFile, sourceJar, destJar, mappings); |
| 60 | //convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile); | 61 | //convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile); |
| 61 | 62 | ||
| 62 | // match fields | 63 | // match fields |
| @@ -67,7 +68,7 @@ public class ConvertMain { | |||
| 67 | // match methods/constructors | 68 | // match methods/constructors |
| 68 | //computeMethodMatches(methodMatchesFile, destJar, outMappingsFile, classMatchesFile); | 69 | //computeMethodMatches(methodMatchesFile, destJar, outMappingsFile, classMatchesFile); |
| 69 | //editMethodMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, methodMatchesFile); | 70 | //editMethodMatches(sourceJar, destJar, outMappingsFile, mappings, classMatchesFile, methodMatchesFile); |
| 70 | //convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile, methodMatchesFile); | 71 | convertMappings(outMappingsFile, sourceJar, destJar, mappings, classMatchesFile, fieldMatchesFile, methodMatchesFile); |
| 71 | } | 72 | } |
| 72 | 73 | ||
| 73 | private static void computeClassMatches(File classMatchesFile, JarFile sourceJar, JarFile destJar, Mappings mappings) | 74 | private static void computeClassMatches(File classMatchesFile, JarFile sourceJar, JarFile destJar, Mappings mappings) |