mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 20:27:02 -05:00
Merge with Fabric 1.1, stage 1
This commit is contained in:
@@ -7,7 +7,6 @@ import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.fabricmc.loom.configuration.ifaceinject.InterfaceInjectionProcessor;
|
||||
import net.fabricmc.loom.util.ZipUtils;
|
||||
|
||||
public interface ModMetadataFile {
|
||||
/**
|
||||
@@ -34,27 +33,19 @@ public interface ModMetadataFile {
|
||||
*/
|
||||
String getFileName();
|
||||
|
||||
/**
|
||||
* {@return a list of the mixin configs declared in this mod metadata file}.
|
||||
*/
|
||||
List<String> getMixinConfigs();
|
||||
|
||||
/**
|
||||
* Reads the mod metadata file from a jar.
|
||||
*
|
||||
* @param jar the path to the jar file
|
||||
* @return the mod metadata file, or {@code null} if not found
|
||||
*/
|
||||
@Deprecated // TODO 1.1 MERGE
|
||||
static @Nullable ModMetadataFile fromJar(Path jar) throws IOException {
|
||||
// architectury.common.json
|
||||
byte[] bytes = ZipUtils.unpackNullable(jar, ArchitecturyCommonJson.FILE_NAME);
|
||||
|
||||
if (bytes != null) {
|
||||
return ArchitecturyCommonJson.of(bytes);
|
||||
}
|
||||
|
||||
// quilt.mod.json
|
||||
bytes = ZipUtils.unpackNullable(jar, QuiltModJson.FILE_NAME);
|
||||
|
||||
if (bytes != null) {
|
||||
return QuiltModJson.of(bytes);
|
||||
}
|
||||
|
||||
return null;
|
||||
return ModMetadataFiles.fromJar(jar);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user