File tree Expand file tree Collapse file tree
src/main/java/com/terraformersmc/modmenu/gui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -600,7 +600,7 @@ public void filesDragged(List<Path> paths) {
600600 Path modsDirectory = FabricLoader .getInstance ().getGameDir ().resolve ("mods" );
601601
602602 // Filter out none mods
603- List <Path > mods = paths .stream ().filter (ModsScreen ::isFabricMod ).collect (Collectors .toList ());
603+ List <Path > mods = paths .stream ().filter (ModsScreen ::isValidMod ).collect (Collectors .toList ());
604604
605605 if (mods .isEmpty ()) {
606606 return ;
@@ -638,9 +638,15 @@ public void filesDragged(List<Path> paths) {
638638 }, ModMenuScreenTexts .DROP_CONFIRM , Text .literal (modList )));
639639 }
640640
641- private static boolean isFabricMod (Path mod ) {
641+ private static boolean isValidMod (Path mod ) {
642642 try (JarFile jarFile = new JarFile (mod .toFile ())) {
643- return jarFile .getEntry ("fabric.mod.json" ) != null ;
643+ var isFabricMod = jarFile .getEntry ("fabric.mod.json" ) != null ;
644+
645+ if (!ModMenu .RUNNING_QUILT ) {
646+ return isFabricMod ;
647+ } else {
648+ return isFabricMod || jarFile .getEntry ("quilt.mod.json" ) != null ;
649+ }
644650 } catch (IOException e ) {
645651 return false ;
646652 }
You can’t perform that action at this time.
0 commit comments