Fixed more packet issues

This commit is contained in:
StevenRS11
2013-11-11 17:33:00 -05:00
parent 20ea00a0a7
commit 51f7e10834
3 changed files with 11 additions and 5 deletions

View File

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

View File

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

View File

@@ -93,7 +93,7 @@ serverPacketHandlerSpec =
@SidedPacketHandler(channels = {PacketConstants.CHANNEL_NAME}, packetHandler = ServerPacketHandler.class))
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";
//need to clean up