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:
parent
329f26ee20
commit
b7f6fbcfcb
16
build.gradle
16
build.gradle
|
@ -493,7 +493,7 @@ project(':forge') {
|
||||||
ext {
|
ext {
|
||||||
output = file('build/install_profile.json')
|
output = file('build/install_profile.json')
|
||||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.0.3'
|
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.0.3'
|
||||||
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.0.4'
|
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.1.0'
|
||||||
}
|
}
|
||||||
doFirst {
|
doFirst {
|
||||||
ext.BIN_PATCHER = 'net.minecraftforge:binarypatcher:' + genClientBinPatches.resolvedVersion
|
ext.BIN_PATCHER = 'net.minecraftforge:binarypatcher:' + genClientBinPatches.resolvedVersion
|
||||||
|
@ -544,14 +544,6 @@ project(':forge') {
|
||||||
client: "'${sha1(tasks.getByName('downloadClientSlim').output)}'",
|
client: "'${sha1(tasks.getByName('downloadClientSlim').output)}'",
|
||||||
server: "'${sha1(tasks.getByName('downloadServerSlim').output)}'"
|
server: "'${sha1(tasks.getByName('downloadServerSlim').output)}'"
|
||||||
],
|
],
|
||||||
MC_DATA: [
|
|
||||||
client: "[net.minecraft:client:${MC_VERSION}:data]",
|
|
||||||
server: "[net.minecraft:server:${MC_VERSION}:data]"
|
|
||||||
],
|
|
||||||
MC_DATA_SHA: [
|
|
||||||
client: "'${sha1(tasks.getByName('downloadClientData').output)}'",
|
|
||||||
server: "'${sha1(tasks.getByName('downloadServerData').output)}'"
|
|
||||||
],
|
|
||||||
MC_EXTRA: [
|
MC_EXTRA: [
|
||||||
client: "[net.minecraft:client:${MC_VERSION}:extra]",
|
client: "[net.minecraft:client:${MC_VERSION}:extra]",
|
||||||
server: "[net.minecraft:server:${MC_VERSION}:extra]"
|
server: "[net.minecraft:server:${MC_VERSION}:extra]"
|
||||||
|
@ -589,13 +581,11 @@ project(':forge') {
|
||||||
args: [
|
args: [
|
||||||
'--input', '{MINECRAFT_JAR}',
|
'--input', '{MINECRAFT_JAR}',
|
||||||
'--slim', '{MC_SLIM}',
|
'--slim', '{MC_SLIM}',
|
||||||
'--data', '{MC_DATA}',
|
|
||||||
'--extra', '{MC_EXTRA}',
|
'--extra', '{MC_EXTRA}',
|
||||||
'--srg', '{MAPPINGS}'
|
'--srg', '{MAPPINGS}'
|
||||||
],
|
],
|
||||||
outputs: [
|
outputs: [
|
||||||
'{MC_SLIM}': '{MC_SLIM_SHA}',
|
'{MC_SLIM}': '{MC_SLIM_SHA}',
|
||||||
'{MC_DATA}': '{MC_DATA_SHA}',
|
|
||||||
'{MC_EXTRA}': '{MC_EXTRA_SHA}'
|
'{MC_EXTRA}': '{MC_EXTRA_SHA}'
|
||||||
]
|
]
|
||||||
], [ // SpecialSource has a bug where it won't create the nessasary directories, remove when they fix that.
|
], [ // SpecialSource has a bug where it won't create the nessasary directories, remove when they fix that.
|
||||||
|
@ -635,7 +625,7 @@ project(':forge') {
|
||||||
}
|
}
|
||||||
|
|
||||||
['client', 'server'].each { side ->
|
['client', 'server'].each { side ->
|
||||||
['slim', 'extra', 'data'].each { type ->
|
['slim', 'extra'].each { type ->
|
||||||
def name = "download${side.capitalize()}${type.capitalize()}"
|
def name = "download${side.capitalize()}${type.capitalize()}"
|
||||||
task "${name}"(type: DownloadMavenArtifact) {
|
task "${name}"(type: DownloadMavenArtifact) {
|
||||||
artifact = "net.minecraft:${side}:${MC_VERSION}:${type}"
|
artifact = "net.minecraft:${side}:${MC_VERSION}:${type}"
|
||||||
|
@ -897,6 +887,8 @@ project(':forge') {
|
||||||
setSources sourceSets.userdev.java.srcDirs.findAll({f -> (f != patcher.patchedSrc) })
|
setSources sourceSets.userdev.java.srcDirs.findAll({f -> (f != patcher.patchedSrc) })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.eclipse.dependsOn('genEclipseRuns')
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
|
|
|
@ -81,13 +81,11 @@ public class LibraryFinder {
|
||||||
|
|
||||||
static Path[] getMCPaths(final String mcVersion, final String mcpVersion, final String forgeVersion, final String forgeGroup, final String type) {
|
static Path[] getMCPaths(final String mcVersion, final String mcpVersion, final String forgeVersion, final String forgeGroup, final String type) {
|
||||||
Path srgMcPath = findLibsPath().resolve(MavenCoordinateResolver.get("net.minecraft", type, "", "srg", mcVersion+"-"+mcpVersion));
|
Path srgMcPath = findLibsPath().resolve(MavenCoordinateResolver.get("net.minecraft", type, "", "srg", mcVersion+"-"+mcpVersion));
|
||||||
Path mcDataPath = findLibsPath().resolve(MavenCoordinateResolver.get("net.minecraft", type, "", "data", mcVersion));
|
|
||||||
Path mcExtrasPath = findLibsPath().resolve(MavenCoordinateResolver.get("net.minecraft", type, "", "extra", mcVersion));
|
Path mcExtrasPath = findLibsPath().resolve(MavenCoordinateResolver.get("net.minecraft", type, "", "extra", mcVersion));
|
||||||
Path patchedBinariesPath = findLibsPath().resolve(MavenCoordinateResolver.get(forgeGroup, "forge", "", type, mcVersion+"-"+forgeVersion));
|
Path patchedBinariesPath = findLibsPath().resolve(MavenCoordinateResolver.get(forgeGroup, "forge", "", type, mcVersion+"-"+forgeVersion));
|
||||||
LOGGER.debug(CORE,"SRG MC at {} is {}", srgMcPath.toString(), pathStatus(srgMcPath));
|
LOGGER.debug(CORE,"SRG MC at {} is {}", srgMcPath.toString(), pathStatus(srgMcPath));
|
||||||
LOGGER.debug(CORE,"MC Data at {} is {}", mcDataPath.toString(), pathStatus(mcDataPath));
|
|
||||||
LOGGER.debug(CORE,"MC Extras at {} is {}", mcExtrasPath.toString(), pathStatus(mcExtrasPath));
|
LOGGER.debug(CORE,"MC Extras at {} is {}", mcExtrasPath.toString(), pathStatus(mcExtrasPath));
|
||||||
LOGGER.debug(CORE,"Forge patches at {} is {}", patchedBinariesPath.toString(), pathStatus(patchedBinariesPath));
|
LOGGER.debug(CORE,"Forge patches at {} is {}", patchedBinariesPath.toString(), pathStatus(patchedBinariesPath));
|
||||||
return new Path[] { patchedBinariesPath, mcDataPath, mcExtrasPath, srgMcPath };
|
return new Path[] { patchedBinariesPath, mcExtrasPath, srgMcPath };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.logging.log4j.Marker;
|
||||||
import org.apache.logging.log4j.MarkerManager;
|
import org.apache.logging.log4j.MarkerManager;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -79,7 +80,13 @@ public class ConfigTracker {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Pair<String, FMLHandshakeMessages.S2CConfigData>> syncConfigs() {
|
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());
|
return configData.entrySet().stream().map(e->Pair.of("Config "+e.getKey(), new FMLHandshakeMessages.S2CConfigData(e.getKey(), e.getValue()))).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue