/** Converts the specified map to the new map format. Args: worldName, loadingScreen */ public boolean convertMapFormat(String par1Str, IProgressUpdate par2IProgressUpdate) { par2IProgressUpdate.setLoadingProgress(0); ArrayList arraylist = new ArrayList(); ArrayList arraylist1 = new ArrayList(); ArrayList arraylist2 = new ArrayList(); File file = new File(savesDirectory, par1Str); File file1 = new File(file, "DIM-1"); File file2 = new File(file, "DIM1"); System.out.println("Scanning folders..."); addRegionFilesToCollection(file, arraylist); if (file1.exists()) { addRegionFilesToCollection(file1, arraylist1); } if (file2.exists()) { addRegionFilesToCollection(file2, arraylist2); } int i = arraylist.size() + arraylist1.size() + arraylist2.size(); System.out.println( (new StringBuilder()).append("Total conversion count is ").append(i).toString()); WorldInfo worldinfo = getWorldInfo(par1Str); Object obj = null; if (worldinfo.getTerrainType() == WorldType.FLAT) { obj = new WorldChunkManagerHell(BiomeGenBase.plains, 0.5F, 0.5F); } else { obj = new WorldChunkManager(worldinfo.getSeed(), worldinfo.getTerrainType()); } convertFile( new File(file, "region"), arraylist, ((WorldChunkManager) (obj)), 0, i, par2IProgressUpdate); convertFile( new File(file1, "region"), arraylist1, new WorldChunkManagerHell(BiomeGenBase.hell, 1.0F, 0.0F), arraylist.size(), i, par2IProgressUpdate); convertFile( new File(file2, "region"), arraylist2, new WorldChunkManagerHell(BiomeGenBase.sky, 0.5F, 0.0F), arraylist.size() + arraylist1.size(), i, par2IProgressUpdate); worldinfo.setSaveVersion(19133); if (worldinfo.getTerrainType() == WorldType.DEFAULT_1_1) { worldinfo.setTerrainType(WorldType.DEFAULT); } createFile(par1Str); ISaveHandler isavehandler = getSaveLoader(par1Str, false); isavehandler.saveWorldInfo(worldinfo); return true; }