private void Func_28175_a(net.minecraft.src.MapDataBase mapdatabase) { if (field_28180_a == null) { return; } try { string file = field_28180_a.Func_28111_b(mapdatabase.field_28152_a); if (file != null) { net.minecraft.src.NBTTagCompound nbttagcompound = new net.minecraft.src.NBTTagCompound (); mapdatabase.Func_28147_b(nbttagcompound); net.minecraft.src.NBTTagCompound nbttagcompound1 = new net.minecraft.src.NBTTagCompound (); nbttagcompound1.SetCompoundTag("data", nbttagcompound); using (FileStream fileoutputstream = File.OpenWrite(file)) net.minecraft.src.CompressedStreamTools.WriteGzippedCompoundToOutputStream(nbttagcompound1 , fileoutputstream); } } catch (System.Exception exception) { Sharpen.Runtime.PrintStackTrace(exception); } }
public virtual void Func_28176_a() { for (int i = 0; i < field_28182_c.Count; i++) { net.minecraft.src.MapDataBase mapdatabase = (net.minecraft.src.MapDataBase)field_28182_c [i]; if (mapdatabase.Func_28150_b()) { Func_28175_a(mapdatabase); mapdatabase.Func_28149_a(false); } } }
public virtual void Func_28177_a(string s, net.minecraft.src.MapDataBase mapdatabase ) { if (mapdatabase == null) { throw new System.Exception("Can't set null data"); } if (field_28179_b.ContainsKey(s)) { var x = field_28179_b[s]; field_28179_b.Remove(s); field_28182_c.Remove(x); } field_28179_b[s] = mapdatabase; field_28182_c.Add(mapdatabase); }
public virtual net.minecraft.src.MapDataBase Func_28178_a(System.Type class1, string s) { net.minecraft.src.MapDataBase mapdatabase = (net.minecraft.src.MapDataBase)field_28179_b [s]; if (mapdatabase != null) { return(mapdatabase); } if (field_28180_a != null) { try { string file = field_28180_a.Func_28111_b(s); if (file != null && File.Exists(file)) { try { mapdatabase = (net.minecraft.src.MapDataBase)class1.GetConstructor(new System.Type [] { Sharpen.Runtime.GetClassForType(typeof(string)) }).Invoke(new object[] { s }); } catch (System.Exception exception1) { throw new System.Exception((new java.lang.StringBuilder()).Append("Failed to instantiate " ).Append(class1.ToString()).ToString(), exception1); } //java.io.FileInputStream fileinputstream = new java.io.FileInputStream(file); net.minecraft.src.NBTTagCompound nbttagcompound; using (FileStream fileinputstream = File.OpenRead(file)) nbttagcompound = net.minecraft.src.CompressedStreamTools.ReadCompoundFromStream(fileinputstream); mapdatabase.Func_28148_a(nbttagcompound.GetCompoundTag("data")); } } catch (System.Exception exception) { Sharpen.Runtime.PrintStackTrace(exception); } } if (mapdatabase != null) { field_28179_b[s] = mapdatabase; field_28182_c.Add(mapdatabase); } return(mapdatabase); }