tweak mixin json findin heuristic
parent
c452b3ae8a
commit
cc05052fcb
|
@ -86,11 +86,18 @@ public final class MixinRefmapHelper {
|
||||||
InputStreamReader inputStreamReader = new InputStreamReader(stream);
|
InputStreamReader inputStreamReader = new InputStreamReader(stream);
|
||||||
try {
|
try {
|
||||||
JsonObject json = GSON.fromJson(inputStreamReader, JsonObject.class);
|
JsonObject json = GSON.fromJson(inputStreamReader, JsonObject.class);
|
||||||
if (json != null && json.has("mixins") && json.get("mixins").isJsonArray()) {
|
|
||||||
|
if (json != null) {
|
||||||
|
boolean hasMixins = json.has("mixins") && json.get("mixins").isJsonArray();
|
||||||
|
boolean hasClient = json.has("client") && json.get("client").isJsonArray();
|
||||||
|
boolean hasServer = json.has("server") && json.get("server").isJsonArray();
|
||||||
|
|
||||||
|
if (json.has("package") && (hasMixins || hasClient || hasServer)) {
|
||||||
if (!onlyWithoutRefmap || !json.has("refmap") || !json.has("minVersion")) {
|
if (!onlyWithoutRefmap || !json.has("refmap") || !json.has("minVersion")) {
|
||||||
mixinFilename.add(entry.getName());
|
mixinFilename.add(entry.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// ...
|
// ...
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue