Fixed More Bugs
Fixed more bugs. Now it's possible to generate a world without crashing. Unfortunately, it's clear that there is a packet-sending loop going on. I'll have to add a check to prevent integrated servers from spamming themselves.
This commit is contained in:
@@ -36,7 +36,18 @@ public class EventHookContainer
|
||||
@ForgeSubscribe
|
||||
public void onWorldLoad(WorldEvent.Load event)
|
||||
{
|
||||
RiftRegenerator.regenerateRiftsInAllWorlds();
|
||||
// We need to initialize PocketManager here because onServerAboutToStart fires before we can
|
||||
// use DimensionManager and onServerStarting fires after the game tries to generate terrain.
|
||||
// If a gateway tries to generate before PocketManager has initialized, we get a crash.
|
||||
if (!PocketManager.isLoaded())
|
||||
{
|
||||
PocketManager.load();
|
||||
}
|
||||
|
||||
if (PocketManager.isLoaded())
|
||||
{
|
||||
RiftRegenerator.regenerateRiftsInAllWorlds();
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
|
||||
Reference in New Issue
Block a user