diff --git a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java index 7ad4ae7c8..7a1305a1c 100644 --- a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java +++ b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java @@ -235,7 +235,10 @@ public class FMLCommonHandler { brd.add(forgeBranding); } - brd.addAll(sidedDelegate.getAdditionalBrandingInformation()); + if (sidedDelegate!=null) + { + brd.addAll(sidedDelegate.getAdditionalBrandingInformation()); + } try { Properties props=new Properties(); props.load(getClass().getClassLoader().getResourceAsStream("fmlbranding.properties")); diff --git a/fml/common/cpw/mods/fml/common/Mod.java b/fml/common/cpw/mods/fml/common/Mod.java index def1228c4..099dbe2bf 100644 --- a/fml/common/cpw/mods/fml/common/Mod.java +++ b/fml/common/cpw/mods/fml/common/Mod.java @@ -71,15 +71,31 @@ public @interface Mod String bukkitPlugin() default ""; /** * Mods that this mod will not load with. - * An optional comma separated string of modid[@value], or the value - which specify mods that - * this mod will refuse to load with, resulting in the game failing to start. The special value - is - * interpreted as meaning all mods, except FML and MCP. The special value -f is - * interpreted as meaning all mods except FML, MCP and MinecraftForge. + * An optional comma separated string of (+|-)(*|modid[@value]) which specify mods that + * this mod will refuse to load with, resulting in the game failing to start. + * Entries can be prefixed with a + for a positive exclusion assertion, or - for a negative exclusion + * assertion. Asterisk is the wildcard and represents all mods. + * + * The only mods that cannot be excluded are FML and MCP, trivially. + * Other special values: + * + * + * Some examples: + * * * If a mod is present on the excluded list, the game will stop and show an error screen. If the * class containing the {@link Mod} annotation has a "getCustomErrorException" method, it will be * called to retrieve a custom error message for display in this case. If two mods have a declared - * exclusion which screen is shown is indeterminate. + * exclusion which is matched, the screen that is shown is indeterminate. * * @return A string listing modids to exclude from loading with this mod. */ diff --git a/fml/patches/common/net/minecraft/src/AnvilChunkLoader.java.patch b/fml/patches/common/net/minecraft/src/AnvilChunkLoader.java.patch new file mode 100644 index 000000000..5849d88bf --- /dev/null +++ b/fml/patches/common/net/minecraft/src/AnvilChunkLoader.java.patch @@ -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); diff --git a/fml/patches/common/net/minecraft/src/NetworkListenThread.java.patch b/fml/patches/common/net/minecraft/src/NetworkListenThread.java.patch index f17a544c1..47bb9b469 100644 --- a/fml/patches/common/net/minecraft/src/NetworkListenThread.java.patch +++ b/fml/patches/common/net/minecraft/src/NetworkListenThread.java.patch @@ -13,7 +13,7 @@ } catch (Exception var4) { -+ FMLLog.log(Level.SEVERE, var4, "A critical server error occured handling a packet, kicking %s", var2); ++ FMLLog.log(Level.SEVERE, var4, "A critical server error occured handling a packet, kicking %s", var2.getPlayer().field_70157_k); field_71751_a.log(Level.WARNING, "Failed to handle packet: " + var4, var4); var2.func_72565_c("Internal server error"); } diff --git a/fml/patches/common/net/minecraft/src/TileEntity.java.patch b/fml/patches/common/net/minecraft/src/TileEntity.java.patch new file mode 100644 index 000000000..8571c3ea0 --- /dev/null +++ b/fml/patches/common/net/minecraft/src/TileEntity.java.patch @@ -0,0 +1,44 @@ +--- ../src-base/common/net/minecraft/src/TileEntity.java ++++ ../src-work/common/net/minecraft/src/TileEntity.java +@@ -1,9 +1,11 @@ + package net.minecraft.src; + ++import cpw.mods.fml.common.FMLLog; + import cpw.mods.fml.common.Side; + import cpw.mods.fml.common.asm.SideOnly; + import java.util.HashMap; + import java.util.Map; ++import java.util.logging.Level; + + public class TileEntity + { +@@ -75,10 +77,10 @@ + public static TileEntity func_70317_c(NBTTagCompound p_70317_0_) + { + TileEntity var1 = null; +- ++ Class var2 = null; + try + { +- Class var2 = (Class)field_70326_a.get(p_70317_0_.func_74779_i("id")); ++ var2 = (Class)field_70326_a.get(p_70317_0_.func_74779_i("id")); + + if (var2 != null) + { +@@ -92,7 +94,15 @@ + + 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()); ++ var1 = null; ++ } + } + else + { diff --git a/fml/patches/common/net/minecraft/src/World.java.patch b/fml/patches/common/net/minecraft/src/World.java.patch index b6099fbcc..d161a5023 100644 --- a/fml/patches/common/net/minecraft/src/World.java.patch +++ b/fml/patches/common/net/minecraft/src/World.java.patch @@ -1,6 +1,45 @@ --- ../src-base/common/net/minecraft/src/World.java +++ ../src-work/common/net/minecraft/src/World.java -@@ -3475,7 +3475,7 @@ +@@ -10,6 +10,8 @@ + import java.util.List; + import java.util.Random; + import java.util.Set; ++ ++import com.google.common.collect.ImmutableList; + + public abstract class World implements IBlockAccess + { +@@ -1552,8 +1554,9 @@ + } + + this.field_72984_F.func_76318_c("remove"); +- this.field_72996_f.removeAll(this.field_72997_g); +- Iterator var5 = this.field_72997_g.iterator(); ++ List fml_entitiesToRemove = ImmutableList.copyOf(this.field_72997_g); ++ this.field_72996_f.removeAll(fml_entitiesToRemove); ++ Iterator var5 = fml_entitiesToRemove.iterator(); + int var3; + int var4; + +@@ -1569,7 +1572,7 @@ + } + } + +- var5 = this.field_72997_g.iterator(); ++ var5 = fml_entitiesToRemove.iterator(); + + while (var5.hasNext()) + { +@@ -1577,7 +1580,7 @@ + this.func_72847_b(var2); + } + +- this.field_72997_g.clear(); ++ this.field_72997_g.removeAll(fml_entitiesToRemove); + this.field_72984_F.func_76318_c("regular"); + + for (var1 = 0; var1 < this.field_72996_f.size(); ++var1) +@@ -3475,7 +3478,7 @@ @SideOnly(Side.CLIENT) public double func_72919_O() {