001package net.minecraft.world.storage; 002 003import cpw.mods.fml.relauncher.Side; 004import cpw.mods.fml.relauncher.SideOnly; 005import java.util.List; 006import net.minecraft.client.AnvilConverterException; 007import net.minecraft.util.IProgressUpdate; 008 009public interface ISaveFormat 010{ 011 /** 012 * Returns back a loader for the specified save directory 013 */ 014 ISaveHandler getSaveLoader(String s, boolean flag); 015 016 @SideOnly(Side.CLIENT) 017 List getSaveList() throws AnvilConverterException; 018 019 void flushCache(); 020 021 @SideOnly(Side.CLIENT) 022 023 /** 024 * gets the world info 025 */ 026 WorldInfo getWorldInfo(String s); 027 028 /** 029 * @args: Takes one argument - the name of the directory of the world to delete. @desc: Delete the world by deleting 030 * the associated directory recursively. 031 */ 032 boolean deleteWorldDirectory(String s); 033 034 @SideOnly(Side.CLIENT) 035 036 /** 037 * @args: Takes two arguments - first the name of the directory containing the world and second the new name for 038 * that world. @desc: Renames the world by storing the new name in level.dat. It does *not* rename the directory 039 * containing the world data. 040 */ 041 void renameWorld(String s, String s1); 042 043 /** 044 * Checks if the save directory uses the old map format 045 */ 046 boolean isOldMapFormat(String s); 047 048 /** 049 * Converts the specified map to the new map format. Args: worldName, loadingScreen 050 */ 051 boolean convertMapFormat(String s, IProgressUpdate iprogressupdate); 052 053 @SideOnly(Side.CLIENT) 054 055 /** 056 * Return whether the given world can be loaded. 057 */ 058 boolean canLoadWorld(String s); 059}