Fix code format

This commit is contained in:
Juuz
2022-06-09 00:45:38 +03:00
parent f4bef55fc8
commit bf804e3596
5 changed files with 4 additions and 5 deletions

View File

@@ -73,7 +73,6 @@ public class ForgeRunsProvider {
if (launchSettings != null) {
launchSettings.evaluateLater(() -> {
if (value.has("args")) {
launchSettings.arg(StreamSupport.stream(value.getAsJsonArray("args").spliterator(), false)
.map(JsonElement::getAsString)

View File

@@ -77,8 +77,6 @@ public class ForgeUserdevProvider extends DependencyProvider {
addDependency(json.get("mcp").getAsString(), Constants.Configurations.SRG);
addDependency(json.get("universal").getAsString(), Constants.Configurations.FORGE_UNIVERSAL);
// addDependency(new SelfBreakingDependency(), Constants.Configurations.FORGE_DEPENDENCIES);
if (Files.notExists(joinedPatches)) {
Files.write(joinedPatches, ZipUtils.unpack(userdevJar.toPath(), json.get("binpatches").getAsString()));
}

View File

@@ -49,7 +49,6 @@ import org.jetbrains.annotations.Nullable;
import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.configuration.providers.minecraft.MinecraftProvider;
import net.fabricmc.loom.util.Constants;
import net.fabricmc.loom.util.DependencyDownloader;
import net.fabricmc.loom.util.ForgeToolExecutor;
import net.fabricmc.loom.util.function.CollectionUtil;

View File

@@ -67,6 +67,7 @@ public class RemapObjectHolderVisitor extends ClassVisitor {
@Override
public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {
MethodVisitor methodVisitor = super.visitMethod(access, name, descriptor, signature, exceptions);
if ("<clinit>".equals(name) && "()V".equals(descriptor) && from != MappingTree.NULL_NAMESPACE_ID && to != MappingTree.NULL_NAMESPACE_ID) {
return new MethodVisitor(api, methodVisitor) {
@Override
@@ -75,10 +76,12 @@ public class RemapObjectHolderVisitor extends ClassVisitor {
value = mappings.mapClassName(str.replace('.', '/'), from, to)
.replace('/', '.');
}
super.visitLdcInsn(value);
}
};
}
return methodVisitor;
}
}

View File

@@ -72,7 +72,7 @@ public final class SrgMerger {
private final @Nullable MemoryMappingTree extra;
private final ListMultimap<SrgMethodKey, MethodData> methodsBySrgName;
public SrgMerger(Path srg, Path tiny, @Nullable ExtraMappings extraMappings, boolean lenient) throws IOException {
private SrgMerger(Path srg, Path tiny, @Nullable ExtraMappings extraMappings, boolean lenient) throws IOException {
this.srg = readSrg(srg);
this.src = new MemoryMappingTree();
this.output = new MemoryMappingTree();