mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 21:47:42 -05:00
Fix code style
This commit is contained in:
@@ -109,9 +109,11 @@ public record AccessWidenerFile(
|
||||
if (jsonObject.has("access_widener")) {
|
||||
if (jsonObject.get("access_widener").isJsonArray()) {
|
||||
JsonArray array = jsonObject.get("access_widener").getAsJsonArray();
|
||||
|
||||
if (array.size() != 1) {
|
||||
throw new UnsupportedOperationException("Loom does not support multiple access wideners in one mod!");
|
||||
}
|
||||
|
||||
awPath = array.get(0).getAsString();
|
||||
} else {
|
||||
awPath = jsonObject.get("access_widener").getAsString();
|
||||
|
||||
@@ -219,17 +219,19 @@ public class ModDependencyInfo {
|
||||
}
|
||||
|
||||
String accessWidenerPath;
|
||||
|
||||
|
||||
if (fieldName.equals("access_widener") && jsonObject.get(fieldName).isJsonArray()) {
|
||||
JsonArray array = jsonObject.get(fieldName).getAsJsonArray();
|
||||
|
||||
if (array.size() != 1) {
|
||||
throw new UnsupportedOperationException("Loom does not support multiple access wideners in one mod!");
|
||||
}
|
||||
|
||||
accessWidenerPath = array.get(0).getAsString();
|
||||
} else {
|
||||
accessWidenerPath = jsonObject.get(fieldName).getAsString();
|
||||
}
|
||||
|
||||
|
||||
byte[] accessWidener = ZipUtils.unpack(inputJar, accessWidenerPath);
|
||||
AccessWidenerReader.Header header = AccessWidenerReader.readHeader(accessWidener);
|
||||
|
||||
|
||||
@@ -253,6 +253,7 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
|
||||
if (allMixinConfigs == null && getReadMixinConfigsFromManifest().get()) {
|
||||
allMixinConfigs = readMixinConfigsFromManifest();
|
||||
}
|
||||
|
||||
if (allMixinConfigs == null) {
|
||||
if (extension.getPlatform().get() == ModPlatform.QUILT) {
|
||||
getProject().getLogger().warn("Could not find quilt.mod.json file in: " + getInputFile().getAsFile().get().getName());
|
||||
|
||||
@@ -65,7 +65,7 @@ public abstract class GenerateDLIConfigTask extends AbstractLoomTask {
|
||||
.argument("client", "--assetsDir")
|
||||
.argument("client", new File(getExtension().getFiles().getUserCache(), "assets").getAbsolutePath());
|
||||
}
|
||||
|
||||
|
||||
if (getExtension().isQuilt()) {
|
||||
launchConfig
|
||||
.argument("client", "--version")
|
||||
|
||||
@@ -37,7 +37,7 @@ public enum ModPlatform {
|
||||
FABRIC(false),
|
||||
FORGE(false),
|
||||
QUILT(true);
|
||||
|
||||
|
||||
boolean experimental;
|
||||
|
||||
ModPlatform(boolean experimental) {
|
||||
|
||||
Reference in New Issue
Block a user