Rewrote All the Things #81

Merged
SenseiKiwi merged 8 commits from rewrite into DevBranch 2013-09-04 03:26:52 +00:00
3 changed files with 13 additions and 3 deletions
Showing only changes of commit 8bfe9dc22e - Show all commits

View File

@@ -36,7 +36,18 @@ public class EventHookContainer
@ForgeSubscribe @ForgeSubscribe
public void onWorldLoad(WorldEvent.Load event) 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 @ForgeSubscribe

View File

@@ -127,7 +127,7 @@ public abstract class NewDimData
IUpdateWatcher<Point4D> linkWatcher) IUpdateWatcher<Point4D> linkWatcher)
{ {
// The isPocket flag is redundant. It's meant as an integrity safeguard. // The isPocket flag is redundant. It's meant as an integrity safeguard.
if (isPocket == (parent != null)) if (isPocket != (parent != null))
{ {
throw new NullPointerException("Dimensions can be pocket dimensions if and only if they have a parent dimension."); throw new NullPointerException("Dimensions can be pocket dimensions if and only if they have a parent dimension.");
} }

View File

@@ -384,6 +384,5 @@ public class mod_pocketDim
CommandCreatePocket.instance().register(event); CommandCreatePocket.instance().register(event);
CommandTeleportPlayer.instance().register(event); CommandTeleportPlayer.instance().register(event);
*/ */
PocketManager.load();
} }
} }