public WorldServer(MinecraftServer minecraftserver, ISaveHandler isavehandler, string s, int i) : base(isavehandler, s, (new Random()).nextLong(), WorldProvider.func_4091_a(i)) { field_819_z = false; field_20912_E = new MCHashTable(); field_6160_D = minecraftserver; }
public override bool func_22101_a(string s, IProgressUpdate iprogressupdate) { iprogressupdate.setLoadingProgress(0); var arraylist = new ArrayList(); var arraylist1 = new ArrayList(); var arraylist2 = new ArrayList(); var arraylist3 = new ArrayList(); var file = new File(field_22106_a, s); var file1 = new File(file, "DIM-1"); [email protected]("Scanning folders..."); func_22108_a(file, arraylist, arraylist1); if (file1.exists()) { func_22108_a(file1, arraylist2, arraylist3); } int i = arraylist.size() + arraylist2.size() + arraylist1.size() + arraylist3.size(); [email protected]( (new StringBuilder()).append("Total conversion count is ").append(i).toString()); func_22107_a(file, arraylist, 0, i, iprogressupdate); func_22107_a(file1, arraylist2, arraylist.size(), i, iprogressupdate); WorldInfo worldinfo = func_22103_b(s); worldinfo.func_22191_a(19132); ISaveHandler isavehandler = func_22105_a(s, false); isavehandler.func_22094_a(worldinfo); func_22109_a(arraylist1, arraylist.size() + arraylist2.size(), i, iprogressupdate); if (file1.exists()) { func_22109_a(arraylist3, arraylist.size() + arraylist2.size() + arraylist1.size(), i, iprogressupdate); } return(true); }
public MapStorage(ISaveHandler par1ISaveHandler) { LoadedDataMap = new Dictionary <string, WorldSavedData>(); LoadedDataList = new List <WorldSavedData>(); IdCounts = new Dictionary <string, short>(); SaveHandler = par1ISaveHandler; LoadIdCounts(); }
/// <summary> /// Converts the specified map to the new map format. Args: worldName, loadingScreen /// </summary> public override bool ConvertMapFormat(string par1Str, IProgressUpdate par2IProgressUpdate) { par2IProgressUpdate.SetLoadingProgress(0); List <string> arraylist = new List <string>(); List <string> arraylist1 = new List <string>(); List <string> arraylist2 = new List <string>(); string file = IOPath.Combine(SavesDirectory, par1Str); string file1 = IOPath.Combine(file, "DIM-1"); string file2 = IOPath.Combine(file, "DIM1"); Console.WriteLine("Scanning folders..."); Func_48432_a(file, arraylist); if (File.Exists(file1)) { Func_48432_a(file1, arraylist1); } if (File.Exists(file2)) { Func_48432_a(file2, arraylist2); } int i = arraylist.Count + arraylist1.Count + arraylist2.Count; Console.WriteLine((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()); } Func_48428_a(IOPath.Combine(file, "region"), arraylist, ((WorldChunkManager)(obj)), 0, i, par2IProgressUpdate); Func_48428_a(IOPath.Combine(file1, "region"), arraylist1, new WorldChunkManagerHell(BiomeGenBase.Hell, 1.0F, 0.0F), arraylist.Count, i, par2IProgressUpdate); Func_48428_a(IOPath.Combine(file2, "region"), arraylist2, new WorldChunkManagerHell(BiomeGenBase.Sky, 0.5F, 0.0F), arraylist.Count + arraylist1.Count, 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); }
public MessageBrokerSaveHandler(ISaveHandler <T> saveHandler) { _saveHandler = saveHandler; }
public Foo(ISaveHandler saveHandler) { }
public SaveDecorator1(ISaveHandler handler) { _handler = handler; }
public TransactionalSaveHandler(ISaveHandler <T> saveHandler) { _saveHandler = saveHandler; }
public SaveDecorator1(ISaveHandler handler) { _handler = handler; NumInstances++; }
public SaveHandler(string objectID) { this.objectID = objectID; backEndSaveSystem = new FireBaseSaveHandler(); backEndSaveSystem.Authenticate(this.objectID); }
public Foo(ISaveHandler saveHandler) { _saveHandler = saveHandler; }
public World(ISaveHandler isavehandler, string s, long l, WorldProvider worldprovider) { scheduledUpdatesAreImmediate = false; field_821_y = new ArrayList(); loadedEntityList = new ArrayList(); unloadedEntityList = new ArrayList(); scheduledTickTreeSet = new TreeSet(); scheduledTickSet = new HashSet(); loadedTileEntityList = new ArrayList(); playerEntities = new ArrayList(); field_6159_E = 0xffffffL; skylightSubtracted = 0; distHashCounter = (new Random()).nextInt(); DIST_HASH_MAGIC = 0x3c6ef35f; editingBlocks = false; lockTimestamp = java.lang.System.currentTimeMillis(); autosavePeriod = 40; rand = new Random(); field_9212_p = false; worldAccesses = new ArrayList(); field_9207_I = new ArrayList(); field_4265_J = 0; spawnHostileMobs = true; spawnPeacefulMobs = true; activeChunkSet = new HashSet(); ambientTickCountdown = rand.nextInt(12000); field_778_L = new ArrayList(); singleplayerWorld = false; worldFile = isavehandler; worldInfo = isavehandler.func_22096_c(); field_9212_p = worldInfo == null; if (worldprovider != null) { worldProvider = worldprovider; } else if (worldInfo != null && worldInfo.func_22178_h() == -1) { worldProvider = new WorldProviderHell(); } else { worldProvider = new WorldProvider(); } bool flag = false; if (worldInfo == null) { worldInfo = new WorldInfo(l, s); flag = true; } else { worldInfo.setLevelName(s); } worldProvider.registerWorld(this); chunkProvider = func_22086_b(); if (flag) { field_9209_x = true; int i = 0; byte byte0 = 64; int j; for (j = 0; !worldProvider.canCoordinateBeSpawn(i, j); j += rand.nextInt(64) - rand.nextInt(64)) { i += rand.nextInt(64) - rand.nextInt(64); } worldInfo.setSpawnPosition(i, byte0, j); field_9209_x = false; } calculateInitialSkylight(); }