Rewrote All the Things #81
@@ -98,8 +98,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;
|
||||||
private static UpdateWatcherProxy<Point4D> linkWatcher = null;
|
private static final UpdateWatcherProxy<Point4D> linkWatcher = new UpdateWatcherProxy<Point4D>();
|
||||||
private static UpdateWatcherProxy<ClientDimData> dimWatcher = null;
|
private static final UpdateWatcherProxy<ClientDimData> dimWatcher = new UpdateWatcherProxy<ClientDimData>();
|
||||||
|
|
||||||
//HashMap that maps all the dimension IDs registered with DimDoors to their DD data.
|
//HashMap that maps all the dimension IDs registered with DimDoors to their DD data.
|
||||||
private static HashMap<Integer, InnerDimData> dimensionData = null;
|
private static HashMap<Integer, InnerDimData> dimensionData = null;
|
||||||
@@ -125,11 +125,7 @@ public class PocketManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
|
|
||||||
//Set up fields
|
|
||||||
dimensionData = new HashMap<Integer, InnerDimData>();
|
dimensionData = new HashMap<Integer, InnerDimData>();
|
||||||
dimWatcher = new UpdateWatcherProxy<ClientDimData>();
|
|
||||||
linkWatcher = new UpdateWatcherProxy<Point4D>();
|
|
||||||
|
|
||||||
//Register Limbo
|
//Register Limbo
|
||||||
DDProperties properties = DDProperties.instance();
|
DDProperties properties = DDProperties.instance();
|
||||||
@@ -396,8 +392,6 @@ public class PocketManager
|
|||||||
public static void unload()
|
public static void unload()
|
||||||
{
|
{
|
||||||
save();
|
save();
|
||||||
dimWatcher = null;
|
|
||||||
linkWatcher = null;
|
|
||||||
dimensionData = null;
|
dimensionData = null;
|
||||||
unregisterPockets();
|
unregisterPockets();
|
||||||
}
|
}
|
||||||
@@ -470,11 +464,7 @@ public class PocketManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
|
|
||||||
// Set up fields
|
|
||||||
dimensionData = new HashMap<Integer, InnerDimData>();
|
dimensionData = new HashMap<Integer, InnerDimData>();
|
||||||
dimWatcher = null; // Clients shouldn't need to watch dims
|
|
||||||
linkWatcher = null; // Clients shouldn't need to watch links
|
|
||||||
|
|
||||||
// Load compacted client-side dimension data
|
// Load compacted client-side dimension data
|
||||||
Compactor.readDimensions(input, new DimRegistrationCallback());
|
Compactor.readDimensions(input, new DimRegistrationCallback());
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class DungeonData
|
|||||||
int indexB = schematicPath.lastIndexOf('/');
|
int indexB = schematicPath.lastIndexOf('/');
|
||||||
indexA = Math.max(indexA, indexB) + 1;
|
indexA = Math.max(indexA, indexB) + 1;
|
||||||
|
|
||||||
return schematicPath.substring(indexA, schematicPath.length() - DungeonHelper.SCHEMATIC_FILE_EXTENSION.length() - indexA);
|
return schematicPath.substring(indexA, schematicPath.length() - DungeonHelper.SCHEMATIC_FILE_EXTENSION.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int weight()
|
public int weight()
|
||||||
|
|||||||
Reference in New Issue
Block a user