Send Dimension Data earlier to ensure players in spatial cells can login without crashing.
This commit is contained in:
@@ -9,6 +9,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
|
||||
import cpw.mods.fml.common.network.FMLEventChannel;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent.ServerConnectionFromClientEvent;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
|
||||
@@ -56,11 +57,17 @@ public class NetworkHandler
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void newConection(ServerConnectionFromClientEvent ev)
|
||||
{
|
||||
WorldSettings.getInstance().sendToPlayer( ev.manager, null );
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void newConection(PlayerLoggedInEvent loginEvent)
|
||||
{
|
||||
if ( loginEvent.player instanceof EntityPlayerMP )
|
||||
WorldSettings.getInstance().sendToPlayer( (EntityPlayerMP) loginEvent.player );
|
||||
WorldSettings.getInstance().sendToPlayer( null, (EntityPlayerMP) loginEvent.player );
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
Reference in New Issue
Block a user