Vanilla/mod bug fixes: CME on entity processing, TileEntity resetting chunk on save/load.

This commit is contained in:
Christian committed 2012-10-29 17:41:08 -04:00
1 parent dd011e16d2
commit 01048c704b
6 files changed
+140 -8

No files matched your search

@@ -0,0 +1,30 @@
--- ../src-base/common/net/minecraft/src/AnvilChunkLoader.java
+++ ../src-work/common/net/minecraft/src/AnvilChunkLoader.java
@@ -9,6 +9,9 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import java.util.logging.Level;
+
+import cpw.mods.fml.common.FMLLog;
public class AnvilChunkLoader implements IThreadedFileIO, IChunkLoader
{
@@ -242,8 +245,15 @@
{
TileEntity var21 = (TileEntity)var17.next();
var10 = new NBTTagCompound();
- var21.func_70310_b(var10);
- var16.func_74742_a(var10);
+ try
+ {
+ var21.func_70310_b(var10);
+ var16.func_74742_a(var10);
+ }
+ catch (Exception e)
+ {
+ FMLLog.log(Level.SEVERE, e, "A TileEntity type %s has throw an exception trying to write state. It will not persist. Report this to the mod author", var21.getClass().getName());
+ }
}
p_75820_3_.func_74782_a("TileEntities", var16);