Fix code style

This commit is contained in:
Juuz
2022-04-24 19:37:06 +03:00
parent 2df553a4cb
commit 99235bcba9
5 changed files with 9 additions and 4 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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());

View File

@@ -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")

View File

@@ -37,7 +37,7 @@ public enum ModPlatform {
FABRIC(false),
FORGE(false),
QUILT(true);
boolean experimental;
ModPlatform(boolean experimental) {