Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into junit
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Jan 20, 2024
2 parents d797b74 + 697a95e commit bacaaa8
Show file tree
Hide file tree
Showing 110 changed files with 1,325 additions and 421 deletions.
9 changes: 0 additions & 9 deletions core/build.gradle

This file was deleted.

5 changes: 0 additions & 5 deletions core/src/main/java/net/neoforged/fml/ICrashCallable.java

This file was deleted.

3 changes: 1 addition & 2 deletions earlydisplay/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ switch (OperatingSystem.current()) {
dependencies {

implementation(project(':loader'))
implementation(project(':core'))

compileOnly("org.jetbrains:annotations:${jetbrains_annotations_version}")
implementation("org.lwjgl:lwjgl:${lwjgl_version}")
Expand All @@ -35,4 +34,4 @@ dependencies {
testRuntimeOnly("org.lwjgl:lwjgl-glfw::${lwjglNatives}")
testRuntimeOnly("org.lwjgl:lwjgl-opengl::${lwjglNatives}")
testRuntimeOnly("org.lwjgl:lwjgl-stb::${lwjglNatives}")
}
}
10 changes: 0 additions & 10 deletions events/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
spi_version=9.0.1
mergetool_version=2.0.0
accesstransformers_version=10.0.1
coremods_version=6.0.0
Expand Down
6 changes: 0 additions & 6 deletions languages/java/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions languages/lowcode/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions languages/minecraft/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 3 additions & 1 deletion loader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
api("org.ow2.asm:asm:${asm_version}")
api("org.ow2.asm:asm-tree:${asm_version}")
api("org.ow2.asm:asm-commons:${asm_version}")
api("net.neoforged:neoforgespi:${spi_version}")
api(project(':spi'))
api("net.neoforged:mergetool:${mergetool_version}:api")
api("org.apache.logging.log4j:log4j-api:${log4j_version}")
api("org.slf4j:slf4j-api:${slf4j_api_version}")
Expand All @@ -19,6 +19,7 @@ dependencies {
api("com.mojang:logging:${mojang_logging_version}")
api "net.neoforged:JarJarSelector:${jarjar_version}"
api "net.neoforged:JarJarMetadata:${jarjar_version}"
api("net.neoforged:bus:${eventbus_version}")

implementation("net.sf.jopt-simple:jopt-simple:${jopt_simple_version}")
implementation("cpw.mods:securejarhandler:${securejarhandler_version}")
Expand All @@ -28,6 +29,7 @@ dependencies {
}
implementation("org.spongepowered:mixin:${mixin_version}")
implementation("net.minecrell:terminalconsoleappender:${terminalconsoleappender_version}")
implementation("commons-io:commons-io:${commons_io_version}")

implementation("org.apache.logging.log4j:log4j-core:${log4j_version}")
annotationProcessor("org.apache.logging.log4j:log4j-core:${log4j_version}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Supplier;

import static net.neoforged.fml.Logging.LOADING;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ private ModLoader()
this.loadingWarnings = FMLLoader.getLoadingModList().getBrokenFiles().stream()
.map(file -> new ModLoadingWarning(null, ModLoadingStage.VALIDATE, InvalidModIdentifier.identifyJarProblem(file.getFilePath()).orElse("fml.modloading.brokenfile"), file.getFileName()))
.collect(Collectors.toList());

FMLLoader.getLoadingModList().getWarnings().stream()
.flatMap(ModLoadingWarning::fromEarlyException)
.forEach(this.loadingWarnings::add);

FMLLoader.getLoadingModList().getModFiles().stream()
.filter(ModFileInfo::missingLicense)
.filter(modFileInfo -> modFileInfo.getMods().stream().noneMatch(thisModInfo -> this.loadingExceptions.stream().map(ModLoadingException::getModInfo).anyMatch(otherInfo -> otherInfo == thisModInfo))) //Ignore files where any other mod already encountered an error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package net.neoforged.fml;

import com.google.common.collect.Streams;
import net.neoforged.fml.loading.EarlyLoadingException;
import net.neoforged.neoforgespi.language.IModInfo;

import java.util.Arrays;
Expand Down Expand Up @@ -43,4 +44,8 @@ public ModLoadingWarning(final IModInfo modInfo, final ModLoadingStage warningSt
public String formatToString() {
return Bindings.getMessageParser().get().parseMessage(i18nMessage, Streams.concat(Stream.of(modInfo, warningStage), context.stream()).toArray());
}

static Stream<ModLoadingWarning> fromEarlyException(final EarlyLoadingException e) {
return e.getAllData().stream().map(ed->new ModLoadingWarning(ed.getModInfo(), ModLoadingStage.VALIDATE, ed.getI18message(), ed.getArgs()));
}
}
Loading

0 comments on commit bacaaa8

Please sign in to comment.