mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Add quilt mode
Squashed commit of the following: commit 2f5cd64dd232996e92e8d1f71e6ce5deb747d247 Author: shedaniel <daniel@shedaniel.me> Date: Wed Apr 20 16:23:18 2022 +0800 Make installer json ignore fabric's on quilt mode Signed-off-by: shedaniel <daniel@shedaniel.me> commit 381b346c88f22f30acd9620f57f6ef03e6c50102 Merge: f272145a1c48b6cbAuthor: shedaniel <daniel@shedaniel.me> Date: Wed Apr 20 15:43:46 2022 +0800 Merge remote-tracking branch 'architectury/dev/0.11.0' into feature/0.11.0-quilt commit f272145a19949c72bf1ebdcec3f7c13ed498eb5a Author: shedaniel <daniel@shedaniel.me> Date: Sat Apr 16 14:22:07 2022 +0800 Match quilt-loom up to 44030f5d4659c425cb6f1450f46be5a0546964f2 Signed-off-by: shedaniel <daniel@shedaniel.me> commit 0e084be5e391e79a75467d1c9a56efd02821247a Merge: 471d6a064a7a2660Author: shedaniel <daniel@shedaniel.me> Date: Sat Apr 16 14:13:40 2022 +0800 Merge remote-tracking branch 'architectury/dev/0.11.0' into feature/0.11.0-quilt commit 471d6a065a18839bbd4d724d8f4383de53752e8b Author: shedaniel <daniel@shedaniel.me> Date: Mon Mar 28 18:47:20 2022 +0800 Add QMJ support Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
@@ -32,16 +32,21 @@ public final class ModUtils {
|
||||
private ModUtils() {
|
||||
}
|
||||
|
||||
public static boolean isMod(File input) {
|
||||
public static boolean isMod(File input, ModPlatform platform) {
|
||||
if (platform == ModPlatform.FORGE) {
|
||||
return ZipUtils.contains(input.toPath(), "META-INF/mods.toml");
|
||||
} else if (platform == ModPlatform.QUILT) {
|
||||
return ZipUtils.contains(input.toPath(), "quilt.mod.json");
|
||||
}
|
||||
|
||||
return ZipUtils.contains(input.toPath(), "fabric.mod.json");
|
||||
}
|
||||
|
||||
public static boolean shouldRemapMod(Logger logger, File input, Object id, boolean forge, String config) {
|
||||
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 (forge && ZipUtils.contains(input.toPath(), "META-INF/mods.toml")) return true;
|
||||
if (!forge && isMod(input)) return true;
|
||||
if (isMod(input, platform)) return true;
|
||||
|
||||
if (forge) {
|
||||
if (platform == ModPlatform.FORGE) {
|
||||
logger.lifecycle(":could not find forge mod in " + config + " but forcing: {}", id);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user