Merge pull request #413 from sfPlayer1/master
backup+default block use fix
This commit is contained in:
commit
ff5eb87e27
3 changed files with 10 additions and 14 deletions
|
@ -27,7 +27,7 @@ public class GuiOldSaveLoadConfirm extends GuiYesNo {
|
|||
super(parent, "", "", 0);
|
||||
this.dirName = dirName;
|
||||
this.saveName = saveName;
|
||||
this.zip = new File(FMLClientHandler.instance().getClient().mcDataDir,String.format("%s-%2$td%2$tm%2$ty%2$tH%2$tM%2$tS.zip", saveName, System.currentTimeMillis()));
|
||||
this.zip = new File(FMLClientHandler.instance().getClient().mcDataDir,String.format("%s-%2$td%2$tm%2$ty%2$tH%2$tM%2$tS.zip", dirName, System.currentTimeMillis()));
|
||||
}
|
||||
@Override
|
||||
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
|
||||
|
|
|
@ -64,24 +64,20 @@ public class ZipperUtil {
|
|||
public static void backupWorld() throws IOException
|
||||
{
|
||||
String dirName = FMLCommonHandler.instance().getMinecraftServerInstance().getFolderName();
|
||||
String saveName;
|
||||
|
||||
if (FMLCommonHandler.instance().getSide().isClient())
|
||||
{
|
||||
saveName = FMLCommonHandler.instance().getMinecraftServerInstance().getWorldName();
|
||||
}
|
||||
else
|
||||
{
|
||||
saveName = dirName;
|
||||
}
|
||||
|
||||
backupWorld(dirName, saveName);
|
||||
backupWorld(dirName);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void backupWorld(String dirName, String saveName) throws IOException
|
||||
{
|
||||
backupWorld(dirName);
|
||||
}
|
||||
|
||||
public static void backupWorld(String dirName) throws IOException
|
||||
{
|
||||
File dstFolder = FMLCommonHandler.instance().getSavesDirectory();
|
||||
File zip = new File(dstFolder, String.format("%s-%2$tY%2$tm%2$td-%2$tH%2$tM%2$tS.zip", saveName, System.currentTimeMillis()));
|
||||
File zip = new File(dstFolder, String.format("%s-%2$tY%2$tm%2$td-%2$tH%2$tM%2$tS.zip", dirName, System.currentTimeMillis()));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -687,7 +687,7 @@ public class GameData {
|
|||
|
||||
private GameData()
|
||||
{
|
||||
iBlockRegistry = new FMLControlledNamespacedRegistry<Block>("air", MAX_BLOCK_ID, MIN_BLOCK_ID, Block.class,'\u0001');
|
||||
iBlockRegistry = new FMLControlledNamespacedRegistry<Block>("minecraft:air", MAX_BLOCK_ID, MIN_BLOCK_ID, Block.class,'\u0001');
|
||||
iItemRegistry = new FMLControlledNamespacedRegistry<Item>(null, MAX_ITEM_ID, MIN_ITEM_ID, Item.class,'\u0002');
|
||||
availabilityMap = new BitSet(MAX_ITEM_ID + 1);
|
||||
blockedIds = new HashSet<Integer>();
|
||||
|
|
Loading…
Reference in a new issue