Files
MinecraftForge/patches/minecraft/net/minecraft/entity/EntityList.java.patch
T
2013-06-29 13:33:14 -04:00

44 lines
1.4 KiB
Diff

--- ../src-base/minecraft/net/minecraft/entity/EntityList.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityList.java
@@ -3,6 +3,9 @@
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.logging.Level;
+
+import cpw.mods.fml.common.FMLLog;
import net.minecraft.entity.ai.EntityMinecartMobSpawner;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.boss.EntityWither;
@@ -126,9 +129,10 @@
p_75615_0_.func_82580_o("Type");
}
+ Class oclass = null;
try
{
- Class oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
+ oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
if (oclass != null)
{
@@ -142,7 +146,17 @@
if (entity != null)
{
- entity.func_70020_e(p_75615_0_);
+ try
+ {
+ entity.func_70020_e(p_75615_0_);
+ }
+ catch (Exception e)
+ {
+ FMLLog.log(Level.SEVERE, e,
+ "An Entity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
+ p_75615_0_.func_74779_i("id"), oclass.getName());
+ entity = null;
+ }
}
else
{