Mazes #117
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -687,10 +691,9 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user