mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Check refmaps exist before adding them to mixin configs (#971)
This commit is contained in:
@@ -345,13 +345,15 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
|
||||
}
|
||||
|
||||
for (RemapParams.RefmapData refmapData : getParameters().getMixinData().get()) {
|
||||
int transformed = ZipUtils.transformJson(JsonObject.class, outputFile, refmapData.mixinConfigs().stream().collect(Collectors.toMap(s -> s, s -> json -> {
|
||||
if (!json.has("refmap")) {
|
||||
json.addProperty("refmap", refmapData.refmapName());
|
||||
}
|
||||
if (ZipUtils.contains(outputFile, refmapData.refmapName())) {
|
||||
int transformed = ZipUtils.transformJson(JsonObject.class, outputFile, refmapData.mixinConfigs().stream().collect(Collectors.toMap(s -> s, s -> json -> {
|
||||
if (!json.has("refmap")) {
|
||||
json.addProperty("refmap", refmapData.refmapName());
|
||||
}
|
||||
|
||||
return json;
|
||||
})));
|
||||
return json;
|
||||
})));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user