Fix some whitespace issues, handle possibly bugged entities as well

This commit is contained in:
Christian committed 2012-10-30 09:13:18 -04:00
1 parent a7eb5dc773
commit a3a93f3387
4 files changed
+83 -13

No files matched your search

@@ -25,20 +25,22 @@
if (var2 != null)
{
@@ -92,7 +94,15 @@
@@ -92,7 +94,17 @@
if (var1 != null)
{
- var1.func_70307_a(p_70317_0_);
+ try
+ {
+ var1.func_70307_a(p_70317_0_);
+ }
+ catch (Exception e)
+ {
+ FMLLog.log(Level.SEVERE, e, "A TileEntity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author", p_70317_0_.func_74779_i("id"), var2.getName());
+ try
+ {
+ var1.func_70307_a(p_70317_0_);
+ }
+ catch (Exception e)
+ {
+ FMLLog.log(Level.SEVERE, e,
+ "A TileEntity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
+ p_70317_0_.func_74779_i("id"), var2.getName());
+ var1 = null;
+ }
+ }
}
else
{