mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Merge extra and data jars. As Log4j has issues with it's config being in a different jar then the custom logger.
This commit is contained in:
1 parent
329f26ee20
commit
b7f6fbcfcb
3 files changed
+13
-16
No files matched your search
@@ -32,6 +32,7 @@ import org.apache.logging.log4j.Marker;
|
||||
import org.apache.logging.log4j.MarkerManager;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collections;
|
||||
@@ -79,7 +80,13 @@ public class ConfigTracker {
|
||||
}
|
||||
|
||||
public List<Pair<String, FMLHandshakeMessages.S2CConfigData>> syncConfigs() {
|
||||
final Map<String, byte[]> configData = configSets.get(ModConfig.Type.SERVER).stream().collect(Collectors.toMap(ModConfig::getFileName, rethrowFunction(mc -> Files.readAllBytes(mc.getFullPath()))));
|
||||
final Map<String, byte[]> configData = configSets.get(ModConfig.Type.SERVER).stream().collect(Collectors.toMap(ModConfig::getFileName, mc -> { //TODO: Test cpw's LambdaExceptionUtils on Oracle javac.
|
||||
try {
|
||||
return Files.readAllBytes(mc.getFullPath());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}));
|
||||
return configData.entrySet().stream().map(e->Pair.of("Config "+e.getKey(), new FMLHandshakeMessages.S2CConfigData(e.getKey(), e.getValue()))).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user