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

Method process

src/me/lpk/mapping/MappingProcessor.java:21–35  ·  view source on GitHub ↗

Given a map of ClassNodes and mappings, returns a map of class names to class bytes. @param nodes @param mappings @return

(Map<String, ClassNode> nodes, Map<String, MappedClass> mappings, boolean useMaxs)

Source from the content-addressed store, hash-verified

19 * @return
20 */
21 public static Map<String, byte[]> process(Map<String, ClassNode> nodes, Map<String, MappedClass> mappings, boolean useMaxs) {
22 Map<String, byte[]> out = new HashMap<String, byte[]>();
23 SkidRemapper mapper = new SkidRemapper(mappings);
24 try {
25 for (ClassNode cn : nodes.values()) {
26 ClassWriter cw = new MappingClassWriter(mappings, useMaxs ? ClassWriter.COMPUTE_MAXS : ClassWriter.COMPUTE_FRAMES);
27 ClassVisitor remapper = new ClassRemapper(cw, mapper);
28 cn.accept(remapper);
29 out.put(mappings.containsKey(cn.name) ? mappings.get(cn.name).getNewName() : cn.name, cw.toByteArray());
30 }
31 } catch (Exception e) {
32 e.printStackTrace();
33 }
34 return out;
35 }
36}

Callers

nothing calls this directly

Calls 2

getNewNameMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected