From e7413d18149adc4494811d740ede65a5c5e01e46 Mon Sep 17 00:00:00 2001 From: Prototik Date: Mon, 25 May 2015 18:48:26 +0700 Subject: [PATCH] Ignore FastCraft on loading for preventing crashes --- .../common/discovery/ModDiscoverer.java.patch | 18 ++++++++++++++++++ .../fml/relauncher/CoreModManager.java.patch | 13 ++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 patches/cpw/mods/fml/common/discovery/ModDiscoverer.java.patch diff --git a/patches/cpw/mods/fml/common/discovery/ModDiscoverer.java.patch b/patches/cpw/mods/fml/common/discovery/ModDiscoverer.java.patch new file mode 100644 index 0000000..6a5c96b --- /dev/null +++ b/patches/cpw/mods/fml/common/discovery/ModDiscoverer.java.patch @@ -0,0 +1,18 @@ +--- ../src-base/minecraft/cpw/mods/fml/common/discovery/ModDiscoverer.java ++++ ../src-work/minecraft/cpw/mods/fml/common/discovery/ModDiscoverer.java +@@ -147,6 +147,15 @@ + Throwables.propagate(t); + } + } ++ ++ java.util.Iterator iterator = modList.iterator(); ++ while(iterator.hasNext()) { ++ ModContainer container = iterator.next(); ++ if ("FastCraft".equals(container.getModId())) { ++ FMLLog.log(Level.WARN, "Found FastCraft mod, removing it..."); ++ iterator.remove(); ++ } ++ } + + return modList; + } diff --git a/patches/cpw/mods/fml/relauncher/CoreModManager.java.patch b/patches/cpw/mods/fml/relauncher/CoreModManager.java.patch index 874a0a0..d10137f 100644 --- a/patches/cpw/mods/fml/relauncher/CoreModManager.java.patch +++ b/patches/cpw/mods/fml/relauncher/CoreModManager.java.patch @@ -65,7 +65,18 @@ } -@@ -424,8 +450,11 @@ +@@ -322,6 +348,10 @@ + FMLRelaunchLog.fine("Not found coremod data in %s", coreMod.getName()); + continue; + } ++ if ("fastcraft.LoadingPlugin".equals(fmlCorePlugin)) { ++ FMLRelaunchLog.warning("Found FastCraft coremod, ignoring..."); ++ continue; ++ } + // Support things that are mod jars, but not FML mod jars + try + { +@@ -424,8 +454,11 @@ MCVersion requiredMCVersion = coreModClazz.getAnnotation(IFMLLoadingPlugin.MCVersion.class); if (!Arrays.asList(rootPlugins).contains(coreModClass) && (requiredMCVersion == null || Strings.isNullOrEmpty(requiredMCVersion.value()))) {