public class MapStorage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.Short> |
idCounts |
private java.util.List<WorldSavedData> |
loadedDataList |
protected java.util.Map<java.lang.String,WorldSavedData> |
loadedDataMap |
private ISaveHandler |
saveHandler |
Constructor and Description |
---|
MapStorage(ISaveHandler saveHandlerIn) |
Modifier and Type | Method and Description |
---|---|
WorldSavedData |
getOrLoadData(java.lang.Class<? extends WorldSavedData> clazz,
java.lang.String dataIdentifier) |
int |
getUniqueDataId(java.lang.String key) |
private void |
loadIdCounts() |
void |
saveAllData() |
private void |
saveData(WorldSavedData data) |
void |
setData(java.lang.String dataIdentifier,
WorldSavedData data) |
private final ISaveHandler saveHandler
protected java.util.Map<java.lang.String,WorldSavedData> loadedDataMap
private final java.util.List<WorldSavedData> loadedDataList
private final java.util.Map<java.lang.String,java.lang.Short> idCounts
public MapStorage(ISaveHandler saveHandlerIn)
@Nullable public WorldSavedData getOrLoadData(java.lang.Class<? extends WorldSavedData> clazz, java.lang.String dataIdentifier)
public void setData(java.lang.String dataIdentifier, WorldSavedData data)
public void saveAllData()
private void saveData(WorldSavedData data)
private void loadIdCounts()
public int getUniqueDataId(java.lang.String key)