MCPcopy Create free account
hub / github.com/GraxCode/zelixkiller / mappingsFromSRG

Method mappingsFromSRG

src/me/lpk/mapping/MappingFactory.java:52–65  ·  view source on GitHub ↗

Returns a map of class names to MappedClasses given an SRG mapping file. @param map @param nodes @return

(File file, Map<String, ClassNode> nodes)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

mappingsFromNodesMethod · 0.95
readMethod · 0.95
linkMappingsMethod · 0.95
fixFromMappingsTextMethod · 0.95

Tested by

no test coverage detected