3
0

Support to disable fastcraft 1.22+

This commit is contained in:
Prototik 2015-05-29 17:24:31 +07:00
parent 94662dd73f
commit 78d84f7848
2 changed files with 37 additions and 14 deletions

View File

@ -1,10 +1,20 @@
--- ../src-base/minecraft/cpw/mods/fml/common/discovery/ModDiscoverer.java --- ../src-base/minecraft/cpw/mods/fml/common/discovery/ModDiscoverer.java
+++ ../src-work/minecraft/cpw/mods/fml/common/discovery/ModDiscoverer.java +++ ../src-work/minecraft/cpw/mods/fml/common/discovery/ModDiscoverer.java
@@ -147,6 +147,15 @@ @@ -16,7 +16,9 @@
Throwables.propagate(t); import java.util.List;
} import java.util.regex.Matcher;
} import java.util.regex.Pattern;
+ +
import org.apache.logging.log4j.Level;
+
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
@@ -148,6 +150,17 @@
}
}
+ if (!"false".equals(System.getProperty("kcauldron.fastcraft.disable", "true"))) {
+ java.util.Iterator<ModContainer> iterator = modList.iterator(); + java.util.Iterator<ModContainer> iterator = modList.iterator();
+ while(iterator.hasNext()) { + while(iterator.hasNext()) {
+ ModContainer container = iterator.next(); + ModContainer container = iterator.next();
@ -13,6 +23,8 @@
+ iterator.remove(); + iterator.remove();
+ } + }
+ } + }
+ }
+
return modList; return modList;
} }

View File

@ -70,18 +70,29 @@
} }
@@ -322,6 +344,10 @@ @@ -293,6 +315,10 @@
String cascadedTweaker = mfAttributes.getValue("TweakClass");
if (cascadedTweaker != null)
{
+ if ("fastcraft.Tweaker".equals(cascadedTweaker) && !"false".equals(System.getProperty("kcauldron.fastcraft.disable", "true"))) {
+ FMLRelaunchLog.info("Found FastCraft tweaker, skipping...");
+ continue;
+ }
FMLRelaunchLog.info("Loading tweaker %s from %s", cascadedTweaker, coreMod.getName());
Integer sortOrder = Ints.tryParse(Strings.nullToEmpty(mfAttributes.getValue("TweakOrder")));
sortOrder = (sortOrder == null ? Integer.valueOf(0) : sortOrder);
@@ -322,6 +348,10 @@
FMLRelaunchLog.fine("Not found coremod data in %s", coreMod.getName()); FMLRelaunchLog.fine("Not found coremod data in %s", coreMod.getName());
continue; continue;
} }
+ if ("fastcraft.LoadingPlugin".equals(fmlCorePlugin)) { + if ("fastcraft.LoadingPlugin".equals(fmlCorePlugin) && !"false".equals(System.getProperty("kcauldron.fastcraft.disable", "true"))) {
+ FMLRelaunchLog.warning("Found FastCraft coremod, ignoring..."); + FMLRelaunchLog.warning("Found FastCraft coremod, skipping...");
+ continue; + continue;
+ } + }
// Support things that are mod jars, but not FML mod jars // Support things that are mod jars, but not FML mod jars
try try
{ {
@@ -424,8 +450,11 @@ @@ -424,8 +454,11 @@
MCVersion requiredMCVersion = coreModClazz.getAnnotation(IFMLLoadingPlugin.MCVersion.class); MCVersion requiredMCVersion = coreModClazz.getAnnotation(IFMLLoadingPlugin.MCVersion.class);
if (!Arrays.asList(rootPlugins).contains(coreModClass) && (requiredMCVersion == null || Strings.isNullOrEmpty(requiredMCVersion.value()))) if (!Arrays.asList(rootPlugins).contains(coreModClass) && (requiredMCVersion == null || Strings.isNullOrEmpty(requiredMCVersion.value())))
{ {