diff --git a/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java b/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java index 6d6f9430..e11866f3 100644 --- a/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java +++ b/src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java @@ -600,7 +600,7 @@ public void filesDragged(List paths) { Path modsDirectory = FabricLoader.getInstance().getGameDir().resolve("mods"); // Filter out none mods - List mods = paths.stream().filter(ModsScreen::isFabricMod).collect(Collectors.toList()); + List mods = paths.stream().filter(ModsScreen::isValidMod).collect(Collectors.toList()); if (mods.isEmpty()) { return; @@ -638,9 +638,15 @@ public void filesDragged(List paths) { }, ModMenuScreenTexts.DROP_CONFIRM, Text.literal(modList))); } - private static boolean isFabricMod(Path mod) { + private static boolean isValidMod(Path mod) { try (JarFile jarFile = new JarFile(mod.toFile())) { - return jarFile.getEntry("fabric.mod.json") != null; + var isFabricMod = jarFile.getEntry("fabric.mod.json") != null; + + if (!ModMenu.RUNNING_QUILT) { + return isFabricMod; + } else { + return isFabricMod || jarFile.getEntry("quilt.mod.json") != null; + } } catch (IOException e) { return false; }