Fix crash when a mod dep doesn't have an AW

This commit is contained in:
Juuz
2022-09-06 20:57:27 +03:00
parent 589ff323e8
commit 1f859baf93

View File

@@ -80,6 +80,10 @@ public class AccessWidenerUtils {
JsonObject jsonObject = LoomGradlePlugin.GSON.fromJson(new String(modJsonBytes, StandardCharsets.UTF_8), JsonObject.class);
if (!jsonObject.has(fieldName)) {
return null;
}
String accessWidenerPath;
if (fieldName.equals("access_widener") && jsonObject.get(fieldName).isJsonArray()) {