Returns a map of class names to MappedClasses given an SRG mapping file. @param map @param nodes @return
(File file, Map<String, ClassNode> nodes)
| 50 | * @return |
| 51 | */ |
| 52 | public static Map<String, MappedClass> mappingsFromSRG(File file, Map<String, ClassNode> nodes) { |
| 53 | Map<String, MappedClass> base = mappingsFromNodes(nodes); |
| 54 | MappingLoader loader = new SRGLoader(nodes); |
| 55 | try { |
| 56 | Map<String, MappedClass> newMappings = loader.read(new FileReader(file)); |
| 57 | for (MappedClass mappedClass : newMappings.values()) { |
| 58 | newMappings = linkMappings(mappedClass, newMappings); |
| 59 | } |
| 60 | base = fixFromMappingsText(base, newMappings); |
| 61 | } catch (FileNotFoundException e) { |
| 62 | e.printStackTrace(); |
| 63 | } |
| 64 | return base; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Returns a map of class names to MappedClasses given an Engima mapping |
nothing calls this directly
no test coverage detected