Allow login packets to only generate on server based connections

Run injectSnapshot on the client thread, wait for result and
disconnect when injectSnapshot fails.
Fix DevServer to load MOD_CLASSES
Fix LaunchTesting to properly load log4j2 markers (don't use a
static variable in that class!)

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-03-15 23:22:28 -04:00
1 parent 0141a959eb
commit d99a55a7d1
14 files changed
+127 -27

No files matched your search

@@ -75,6 +75,7 @@ public class FMLDevServerLaunchProvider extends FMLCommonLaunchHandler implement
};
}
@SuppressWarnings("unchecked")
@Override
public void setup(IEnvironment environment, final Map<String, ?> arguments)
{
@@ -82,6 +83,8 @@ public class FMLDevServerLaunchProvider extends FMLCommonLaunchHandler implement
final Path forgemodstoml = LibraryFinder.findJarPathFor("META-INF/mods.toml", "forgemodstoml");
((Map<String, List<Pair<Path,List<Path>>>>) arguments).computeIfAbsent("explodedTargets", a->new ArrayList<>()).
add(Pair.of(forgemodstoml, Collections.singletonList(compiledClasses)));
processModClassesEnvironmentVariable((Map<String, List<Pair<Path, List<Path>>>>) arguments);
}
@Override
@@ -32,12 +32,9 @@ import java.net.Proxy;
import java.util.Arrays;
import java.util.Locale;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class LaunchTesting
{
private static final Logger LOGGER = LogManager.getLogger();
public static void main(String... args) throws InterruptedException
{
final String markerselection = System.getProperty("forge.logging.markers", "");
@@ -130,7 +127,7 @@ public class LaunchTesting
try {
auth.logIn();
} catch (AuthenticationException e) {
LOGGER.error("Login failed!", e);
LogManager.getLogger().error("Login failed!", e);
throw new RuntimeException(e); // don't set other variables
}