Add support for loading multiple mappings
New loadMappings() method in JarMapping, can be called to merge two mapping files. Useful for loading both 1.4.6 and 1.4.7 (relocated).
This commit is contained in:
parent
112f780e85
commit
0ea3957d6f
@ -42,6 +42,10 @@ public class JarMapping {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JarMapping(BufferedReader reader, ShadeRelocationSimulator shader) throws IOException {
|
||||||
|
loadMappings(reader, shader);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a mapping given a .csrg file
|
* Load a mapping given a .csrg file
|
||||||
*
|
*
|
||||||
@ -50,7 +54,7 @@ public class JarMapping {
|
|||||||
* relocation
|
* relocation
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public JarMapping(BufferedReader reader, ShadeRelocationSimulator shader) throws IOException {
|
public void loadMappings(BufferedReader reader, ShadeRelocationSimulator shader) throws IOException {
|
||||||
if (shader == null) {
|
if (shader == null) {
|
||||||
shader = ShadeRelocationSimulator.IDENTITY;
|
shader = ShadeRelocationSimulator.IDENTITY;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user