Change DimensionManager.getCurrentSaveRootDirectory() to try and work even for the new server about to start event

Update FML:8921cfe
8921cfe Remember to add the new patches!
cd67596 The "ServerStarting" event should now properly crash the server if it fails, so the client will properly exit. A
This commit is contained in:
Christian 2013-01-22 10:07:41 -05:00
parent c40c81924a
commit a5325cf0a8
2 changed files with 6 additions and 0 deletions

View file

@ -326,6 +326,12 @@ public class DimensionManager
{
return ((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).getSaveDirectory();
}
else if (MinecraftServer.getServer() != null)
{
MinecraftServer srv = MinecraftServer.getServer();
SaveHandler saveHandler = (SaveHandler) srv.getActiveAnvilConverter().getSaveLoader(srv.getFolderName(), false);
return saveHandler.getSaveDirectory();
}
else
{
return null;