Exemplo n.º 1
0
  public WorldInfo func_75803_c(String p_75803_1_) {
    File var2 = new File(this.field_75808_a, p_75803_1_);
    if (!var2.exists()) {
      return null;
    } else {
      File var3 = new File(var2, "level.dat");
      NBTTagCompound var4;
      NBTTagCompound var5;
      if (var3.exists()) {
        try {
          var4 = CompressedStreamTools.func_74796_a(new FileInputStream(var3));
          var5 = var4.func_74775_l("Data");
          return new WorldInfo(var5);
        } catch (Exception var7) {
          var7.printStackTrace();
        }
      }

      var3 = new File(var2, "level.dat_old");
      if (var3.exists()) {
        try {
          var4 = CompressedStreamTools.func_74796_a(new FileInputStream(var3));
          var5 = var4.func_74775_l("Data");
          return new WorldInfo(var5);
        } catch (Exception var6) {
          var6.printStackTrace();
        }
      }

      return null;
    }
  }
Exemplo n.º 2
0
 @SideOnly(Side.CLIENT)
 public void func_75806_a(String p_75806_1_, String p_75806_2_) {
   File var3 = new File(this.field_75808_a, p_75806_1_);
   if (var3.exists()) {
     File var4 = new File(var3, "level.dat");
     if (var4.exists()) {
       try {
         NBTTagCompound var5 = CompressedStreamTools.func_74796_a(new FileInputStream(var4));
         NBTTagCompound var6 = var5.func_74775_l("Data");
         var6.func_74778_a("LevelName", p_75806_2_);
         CompressedStreamTools.func_74799_a(var5, new FileOutputStream(var4));
       } catch (Exception var7) {
         var7.printStackTrace();
       }
     }
   }
 }