mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 18:49:46 +00:00
Allow the refmapper output file to be specified as an AP arg
This commit is contained in:
1 parent
e28affdc5b
commit
d53bd8d259
1 file changed
+10
-2
@@ -76,6 +76,11 @@ class AnnotatedMixins {
|
||||
*/
|
||||
private final String outSrgFileName;
|
||||
|
||||
/**
|
||||
* Name of the resource to write remapped refs to
|
||||
*/
|
||||
private final String outRefMapFileName;
|
||||
|
||||
/**
|
||||
* File containing the reobfd srgs
|
||||
*/
|
||||
@@ -101,7 +106,10 @@ class AnnotatedMixins {
|
||||
*/
|
||||
private AnnotatedMixins(ProcessingEnvironment processingEnv) {
|
||||
String outSrgFileName = processingEnv.getOptions().get("outSrgFile");
|
||||
this.outSrgFileName = (outSrgFileName != null) ? outSrgFileName : "mixins.srg";
|
||||
this.outSrgFileName = (outSrgFileName != null) ? outSrgFileName : "mixins.srg";
|
||||
|
||||
String outRefMapFileName = processingEnv.getOptions().get("outRefMapFile");
|
||||
this.outRefMapFileName = (outRefMapFileName != null) ? outRefMapFileName : ReferenceMapper.DEFAULT_RESOURCE;
|
||||
|
||||
String reobfSrgFileName = processingEnv.getOptions().get("reobfSrgFile");
|
||||
if (reobfSrgFileName == null) {
|
||||
@@ -192,7 +200,7 @@ class AnnotatedMixins {
|
||||
|
||||
try {
|
||||
Filer filer = this.processingEnv.getFiler();
|
||||
FileObject outSrg = filer.createResource(StandardLocation.CLASS_OUTPUT, "", ReferenceMapper.DEFAULT_RESOURCE);
|
||||
FileObject outSrg = filer.createResource(StandardLocation.CLASS_OUTPUT, "", this.outRefMapFileName);
|
||||
writer = new PrintWriter(outSrg.openWriter());
|
||||
this.refMapper.write(writer);
|
||||
} catch (IOException ex) {
|
||||
|
||||
Reference in new issue
Block a user