mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-03 05:57:42 -05:00
Make ModPlatform.isMod return true for Fabric mods on Quilt
This commit is contained in:
@@ -107,7 +107,7 @@ public class JarNester {
|
||||
|
||||
for (File file : jars) {
|
||||
String nestedJarPath = "META-INF/jars/" + file.getName();
|
||||
Preconditions.checkArgument(ModUtils.isMod(file, platform) || ModUtils.isMod(file, ModPlatform.FABRIC), "Cannot nest none mod jar: " + file.getName());
|
||||
Preconditions.checkArgument(ModUtils.isMod(file, platform), "Cannot nest none mod jar: " + file.getName());
|
||||
|
||||
for (JsonElement nestedJar : nestedJars) {
|
||||
String nestedJarString = nestedJar.getAsString();
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class ModUtils {
|
||||
if (platform == ModPlatform.FORGE) {
|
||||
return ZipUtils.contains(input, "META-INF/mods.toml");
|
||||
} else if (platform == ModPlatform.QUILT) {
|
||||
return ZipUtils.contains(input, "quilt.mod.json");
|
||||
return ZipUtils.contains(input, "quilt.mod.json") || isMod(input, ModPlatform.FABRIC);
|
||||
}
|
||||
|
||||
return ZipUtils.contains(input, "fabric.mod.json");
|
||||
@@ -73,18 +73,13 @@ public final class ModUtils {
|
||||
|
||||
public static boolean shouldRemapMod(Logger logger, File input, Object id, ModPlatform platform, String config) {
|
||||
if (ZipUtils.contains(input.toPath(), "architectury.common.marker")) return true;
|
||||
if (isMod(input, platform)) return true;
|
||||
if (isMod(input.toPath(), platform)) return true;
|
||||
|
||||
if (platform == ModPlatform.FORGE) {
|
||||
logger.lifecycle(":could not find forge mod in " + config + " but forcing: {}", id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (platform == ModPlatform.QUILT && isMod(input, ModPlatform.FABRIC)) {
|
||||
logger.lifecycle(":found fabric mod on quilt {} in {}", id, config);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user