mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 03:25:18 +00:00
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:
14 files changed
+127
-27
No files matched your search
@@ -19,6 +19,8 @@
|
||||
|
||||
package net.minecraftforge.registries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -146,15 +148,15 @@ public class RegistryManager
|
||||
this.superTypes.clear();
|
||||
}
|
||||
|
||||
public static List<Pair<String, FMLHandshakeMessages.S2CRegistry>> generateRegistryPackets()
|
||||
public static List<Pair<String, FMLHandshakeMessages.S2CRegistry>> generateRegistryPackets(boolean isLocal)
|
||||
{
|
||||
return ACTIVE.takeSnapshot(false).entrySet().stream().
|
||||
return !isLocal ? ACTIVE.takeSnapshot(false).entrySet().stream().
|
||||
map(e->Pair.of("Registry " + e.getKey(), new FMLHandshakeMessages.S2CRegistry(e.getKey(), e.getValue()))).
|
||||
collect(Collectors.toList());
|
||||
collect(Collectors.toList()) : Collections.emptyList();
|
||||
}
|
||||
|
||||
public static List<ResourceLocation> registryNames()
|
||||
{
|
||||
return ACTIVE.registries.entrySet().stream().map(Map.Entry::getKey).collect(Collectors.toList());
|
||||
return new ArrayList<>(ACTIVE.registries.keySet());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user