28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/storage/SaveFormatOld.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/storage/SaveFormatOld.java
|
|
@@ -109,6 +109,24 @@
|
|
}
|
|
}
|
|
|
|
+ //Forge: Special version of the above that runs during actual world loading and not metadata gathering.
|
|
+ public static WorldInfo loadAndFix(File file, DataFixer fixer, SaveHandler save)
|
|
+ {
|
|
+ try
|
|
+ {
|
|
+ NBTTagCompound nbt = CompressedStreamTools.func_74796_a(new FileInputStream(file));
|
|
+ WorldInfo info = new WorldInfo(fixer.func_188257_a(FixTypes.LEVEL, nbt.func_74775_l("Data")));
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataLoad(save, info, nbt);
|
|
+ return info;
|
|
+ }
|
|
+ catch (net.minecraftforge.fml.common.StartupQuery.AbortedException e) { throw e; }
|
|
+ catch (Exception exception)
|
|
+ {
|
|
+ field_151479_b.error((String)("Exception reading " + file), (Throwable)exception);
|
|
+ return null;
|
|
+ }
|
|
+ }
|
|
+
|
|
@SideOnly(Side.CLIENT)
|
|
public void func_75806_a(String p_75806_1_, String p_75806_2_)
|
|
{
|