Some tweaks around the code base. A functional consumer for networking - return a bool from your consumer function, rather than setPacketHandled.

Tweak the server modloading behaviour to try and be a bit clearer that a mod errored.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-09-16 20:14:25 -04:00
1 parent 79ce18ac3e
commit 71a4828809
7 files changed
+80 -15

No files matched your search

@@ -20,6 +20,7 @@
package net.minecraftforge.fml;
import java.util.List;
import java.util.stream.Collectors;
public class LoadingFailedException extends RuntimeException {
private final List<ModLoadingException> loadingExceptions;
@@ -31,4 +32,9 @@ public class LoadingFailedException extends RuntimeException {
public List<ModLoadingException> getErrors() {
return this.loadingExceptions;
}
@Override
public String getMessage() {
return "Loading errors encountered: " + this.loadingExceptions.stream().map(ModLoadingException::getMessage).collect(Collectors.joining(",\n\t", "[\n\t", "\n]"));
}
}