Files
MinecraftForge/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch
T
Christian 30d532f4fc Pass 1: Most patches are restored.
NOTES: 1. Network is completely broken. 2. GameRegistry is partially broken. 3. ID sync is not in.
2013-12-02 23:48:26 -05:00

47 lines
1.4 KiB
Diff

--- ../src-base/minecraft/net/minecraft/tileentity/TileEntity.java
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntity.java
@@ -1,10 +1,13 @@
package net.minecraft.tileentity;
+import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
+import java.util.logging.Level;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockJukebox;
import net.minecraft.crash.CrashReportCategory;
@@ -87,9 +90,10 @@
{
TileEntity tileentity = null;
+ Class oclass = null;
try
{
- Class oclass = (Class)field_145855_i.get(p_145827_0_.func_74779_i("id"));
+ oclass = (Class)field_145855_i.get(p_145827_0_.func_74779_i("id"));
if (oclass != null)
{
@@ -103,7 +107,17 @@
if (tileentity != null)
{
+ try
+ {
tileentity.func_145839_a(p_145827_0_);
+ }
+ catch (Exception ex)
+ {
+ FMLLog.log(Level.SEVERE, ex,
+ "A TileEntity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
+ p_145827_0_.func_74779_i("id"), oclass.getName());
+ tileentity = null;
+ }
}
else
{