| 1 | package net.minecraft.world.storage;
|
| 2 |
|
| 3 | import java.util.List;
|
| 4 | import net.minecraft.client.AnvilConverterException;
|
| 5 | import net.minecraft.util.IProgressUpdate;
|
| 6 |
|
| 7 | public interface ISaveFormat
|
| 8 | {
|
| 9 | /**
|
| 10 | * Returns the name of the save format.
|
| 11 | */
|
| 12 | String getName();
|
| 13 |
|
| 14 | /**
|
| 15 | * Returns back a loader for the specified save directory
|
| 16 | */
|
| 17 | ISaveHandler getSaveLoader(String saveName, boolean storePlayerdata);
|
| 18 |
|
| 19 | List<SaveFormatComparator> getSaveList() throws AnvilConverterException;
|
| 20 |
|
| 21 | void flushCache();
|
| 22 |
|
| 23 | /**
|
| 24 | * Returns the world's WorldInfo object
|
| 25 | */
|
| 26 | WorldInfo getWorldInfo(String saveName);
|
| 27 |
|
| 28 | boolean isNewLevelIdAcceptable(String saveName);
|
| 29 |
|
| 30 | /**
|
| 31 | * @args: Takes one argument - the name of the directory of the world to delete. @desc: Delete the world by deleting
|
| 32 | * the associated directory recursively.
|
| 33 | *
|
| 34 | * @param saveName The current save's name
|
| 35 | */
|
| 36 | boolean deleteWorldDirectory(String saveName);
|
| 37 |
|
| 38 | /**
|
| 39 | * Renames the world by storing the new name in level.dat. It does *not* rename the directory containing the world
|
| 40 | * data.
|
| 41 | */
|
| 42 | void renameWorld(String dirName, String newName);
|
| 43 |
|
| 44 | boolean isConvertible(String saveName);
|
| 45 |
|
| 46 | /**
|
| 47 | * gets if the map is old chunk saving (true) or McRegion (false)
|
| 48 | */
|
| 49 | boolean isOldMapFormat(String saveName);
|
| 50 |
|
| 51 | /**
|
| 52 | * converts the map to mcRegion
|
| 53 | */
|
| 54 | boolean convertMapFormat(String filename, IProgressUpdate progressCallback);
|
| 55 |
|
| 56 | /**
|
| 57 | * Return whether the given world can be loaded.
|
| 58 | *
|
| 59 | * @param saveName The current save's name
|
| 60 | */
|
| 61 | boolean canLoadWorld(String saveName);
|
| 62 | }
|
| 63 |
|