1.6.2 code #121

Merged
StevenRS11 merged 78 commits from 1.6.2-code into master 2014-01-03 07:15:09 +00:00
3 changed files with 11 additions and 5 deletions
Showing only changes of commit 51f7e10834 - Show all commits

View File

@@ -56,7 +56,10 @@ public class ConnectionHandler implements IConnectionHandler
@Override @Override
public void connectionClosed(INetworkManager manager) public void connectionClosed(INetworkManager manager)
{ {
return; if(PocketManager.isConnected)
{
PocketManager.unload();
}
} }
@Override @Override

View File

@@ -205,6 +205,8 @@ public class PocketManager
private static volatile boolean isLoading = false; private static volatile boolean isLoading = false;
private static volatile boolean isLoaded = false; private static volatile boolean isLoaded = false;
private static volatile boolean isSaving = false; private static volatile boolean isSaving = false;
public static volatile boolean isConnected = false;
private static final UpdateWatcherProxy<Point4D> linkWatcher = new UpdateWatcherProxy<Point4D>(); private static final UpdateWatcherProxy<Point4D> linkWatcher = new UpdateWatcherProxy<Point4D>();
private static final UpdateWatcherProxy<ClientDimData> dimWatcher = new UpdateWatcherProxy<ClientDimData>(); private static final UpdateWatcherProxy<ClientDimData> dimWatcher = new UpdateWatcherProxy<ClientDimData>();
private static ArrayList<NewDimData> rootDimensions = null; private static ArrayList<NewDimData> rootDimensions = null;
@@ -586,6 +588,7 @@ public class PocketManager
public static void unload() public static void unload()
{ {
System.out.println("Unloading Pocket Dimensions...");
if (!isLoaded) if (!isLoaded)
{ {
throw new IllegalStateException("Pocket dimensions have already been unloaded!"); throw new IllegalStateException("Pocket dimensions have already been unloaded!");
@@ -596,6 +599,7 @@ public class PocketManager
dimensionData = null; dimensionData = null;
rootDimensions = null; rootDimensions = null;
isLoaded = false; isLoaded = false;
isConnected = false;
} }
public static DimLink getLink(int x, int y, int z, World world) public static DimLink getLink(int x, int y, int z, World world)
@@ -688,9 +692,8 @@ public class PocketManager
// Register pocket dimensions // Register pocket dimensions
DDProperties properties = DDProperties.instance(); DDProperties properties = DDProperties.instance();
registerPockets(properties);
isLoaded = true; isLoaded = true;
isLoading = false; isLoading = false;
isConnected = true;
} }
} }

View File

@@ -93,7 +93,7 @@ serverPacketHandlerSpec =
@SidedPacketHandler(channels = {PacketConstants.CHANNEL_NAME}, packetHandler = ServerPacketHandler.class)) @SidedPacketHandler(channels = {PacketConstants.CHANNEL_NAME}, packetHandler = ServerPacketHandler.class))
public class mod_pocketDim public class mod_pocketDim
{ {
public static final String version = "1.5.2R1.4.1RC1"; public static final String version = "1.6.2R2.1.1RC1";
public static final String modid = "dimdoors"; public static final String modid = "dimdoors";
//need to clean up //need to clean up