From 86577525cdc72198727490dff37530dfaf013c88 Mon Sep 17 00:00:00 2001 From: Hephaestus-Dev <54509200+Hephaestus-Dev@users.noreply.github.com> Date: Thu, 8 Oct 2020 12:42:07 -0700 Subject: [PATCH] Mark auto-generated mods with a custom value (#271) * Make the barebones `fabric.mod.json` generated for non-mod dependencies an API for ModMenu purposes to prevent large mods with many dependencies from cluttering the menu. * Changed from providing `modmenu:api` to `fabric-loom:generated` to be agnostic about third party mod usage. --- src/main/java/net/fabricmc/loom/util/NestedJars.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/fabricmc/loom/util/NestedJars.java b/src/main/java/net/fabricmc/loom/util/NestedJars.java index bdb7ed4..2d57c8c 100644 --- a/src/main/java/net/fabricmc/loom/util/NestedJars.java +++ b/src/main/java/net/fabricmc/loom/util/NestedJars.java @@ -224,6 +224,10 @@ public class NestedJars { jsonObject.addProperty("version", dependency.getModuleVersion()); jsonObject.addProperty("name", dependency.getModuleName()); + JsonObject custom = new JsonObject(); + custom.addProperty("fabric-loom:generated", true); + jsonObject.add("custom", custom); + return GSON.toJson(jsonObject); }