public class SaveFormatOld extends java.lang.Object implements ISaveFormat
Modifier and Type | Field and Description |
---|---|
protected DataFixer |
dataFixer |
java.io.File |
savesDirectory
Reference to the File object representing the directory for the world saves
|
Constructor and Description |
---|
SaveFormatOld(java.io.File savesDirectoryIn,
DataFixer dataFixerIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
canLoadWorld(java.lang.String saveName)
Return whether the given world can be loaded.
|
boolean |
convertMapFormat(java.lang.String filename,
IProgressUpdate progressCallback)
converts the map to mcRegion
|
protected static boolean |
deleteFiles(java.io.File[] files)
Deletes a list of files and directories.
|
boolean |
deleteWorldDirectory(java.lang.String saveName)
Deletes a world directory.
|
void |
flushCache() |
java.io.File |
getFile(java.lang.String p_186352_1_,
java.lang.String p_186352_2_) |
java.lang.String |
getName()
Returns the name of the save format.
|
java.util.List<WorldSummary> |
getSaveList() |
ISaveHandler |
getSaveLoader(java.lang.String saveName,
boolean storePlayerdata)
Returns back a loader for the specified save directory
|
static WorldInfo |
getWorldData(java.io.File p_186353_0_,
DataFixer dataFixerIn) |
WorldInfo |
getWorldInfo(java.lang.String saveName)
Returns the world's WorldInfo object
|
boolean |
isConvertible(java.lang.String saveName) |
boolean |
isNewLevelIdAcceptable(java.lang.String saveName) |
boolean |
isOldMapFormat(java.lang.String saveName)
gets if the map is old chunk saving (true) or McRegion (false)
|
static WorldInfo |
loadAndFix(java.io.File file,
DataFixer fixer,
SaveHandler save) |
void |
renameWorld(java.lang.String dirName,
java.lang.String newName)
Renames the world by storing the new name in level.dat.
|
public final java.io.File savesDirectory
protected final DataFixer dataFixer
public SaveFormatOld(java.io.File savesDirectoryIn, DataFixer dataFixerIn)
public java.lang.String getName()
getName
in interface ISaveFormat
public java.util.List<WorldSummary> getSaveList() throws AnvilConverterException
getSaveList
in interface ISaveFormat
AnvilConverterException
public void flushCache()
flushCache
in interface ISaveFormat
public WorldInfo getWorldInfo(java.lang.String saveName)
getWorldInfo
in interface ISaveFormat
public static WorldInfo loadAndFix(java.io.File file, DataFixer fixer, SaveHandler save)
public void renameWorld(java.lang.String dirName, java.lang.String newName)
renameWorld
in interface ISaveFormat
public ISaveHandler getSaveLoader(java.lang.String saveName, boolean storePlayerdata)
getSaveLoader
in interface ISaveFormat
public boolean isNewLevelIdAcceptable(java.lang.String saveName)
isNewLevelIdAcceptable
in interface ISaveFormat
public boolean deleteWorldDirectory(java.lang.String saveName)
deleteWorldDirectory
in interface ISaveFormat
protected static boolean deleteFiles(java.io.File[] files)
public boolean isConvertible(java.lang.String saveName)
isConvertible
in interface ISaveFormat
public boolean isOldMapFormat(java.lang.String saveName)
isOldMapFormat
in interface ISaveFormat
public boolean convertMapFormat(java.lang.String filename, IProgressUpdate progressCallback)
convertMapFormat
in interface ISaveFormat
public boolean canLoadWorld(java.lang.String saveName)
canLoadWorld
in interface ISaveFormat
public java.io.File getFile(java.lang.String p_186352_1_, java.lang.String p_186352_2_)
getFile
in interface ISaveFormat