diff --git a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch index b3d3008cd..35603e89d 100644 --- a/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch +++ b/patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch @@ -32,7 +32,19 @@ } public void func_147279_a(S0BPacketAnimation p_147279_1_) -@@ -1127,6 +1134,10 @@ +@@ -735,6 +742,11 @@ + float f = (float)(p_147281_1_.func_149028_l() * 360) / 256.0F; + float f1 = (float)(p_147281_1_.func_149030_m() * 360) / 256.0F; + EntityLivingBase entitylivingbase = (EntityLivingBase)EntityList.func_75616_a(p_147281_1_.func_149025_e(), this.field_147299_f.field_71441_e); ++ if (entitylivingbase == null) ++ { ++ cpw.mods.fml.common.FMLLog.info("Server attempted to spawn an unknown entity using ID: {0} at ({1}, {2}, {3}) Skipping!", p_147281_1_.func_149025_e(), d0, d1, d2); ++ return; ++ } + entitylivingbase.field_70118_ct = p_147281_1_.func_149023_f(); + entitylivingbase.field_70117_cu = p_147281_1_.func_149034_g(); + entitylivingbase.field_70116_cv = p_147281_1_.func_149029_h(); +@@ -1127,6 +1139,10 @@ { tileentity.func_145839_a(p_147273_1_.func_148857_g()); } diff --git a/patches/minecraft/net/minecraft/entity/EntityList.java.patch b/patches/minecraft/net/minecraft/entity/EntityList.java.patch new file mode 100644 index 000000000..f1c7ee4ef --- /dev/null +++ b/patches/minecraft/net/minecraft/entity/EntityList.java.patch @@ -0,0 +1,10 @@ +--- ../src-base/minecraft/net/minecraft/entity/EntityList.java ++++ ../src-work/minecraft/net/minecraft/entity/EntityList.java +@@ -84,6 +84,7 @@ + + public static void func_75618_a(Class p_75618_0_, String p_75618_1_, int p_75618_2_) + { ++ if (p_75618_2_ < 0 || p_75618_2_ > 255) throw new IllegalArgumentException("Attempted to register a entity with invalid ID: " + p_75618_2_ + " Name: " + p_75618_1_ + " Class: " + p_75618_0_); + if (field_75625_b.containsKey(p_75618_1_)) + { + throw new IllegalArgumentException("ID is already registered: " + p_75618_1_);