93 lines
4.1 KiB
Diff
93 lines
4.1 KiB
Diff
--- ../src-base/minecraft/cpw/mods/fml/relauncher/CoreModManager.java
|
|
+++ ../src-work/minecraft/cpw/mods/fml/relauncher/CoreModManager.java
|
|
@@ -27,10 +27,14 @@
|
|
import java.util.Map;
|
|
import java.util.jar.Attributes;
|
|
import java.util.jar.JarFile;
|
|
+
|
|
+import kcauldron.KCauldronClassTransformer;
|
|
import net.minecraft.launchwrapper.ITweaker;
|
|
import net.minecraft.launchwrapper.Launch;
|
|
import net.minecraft.launchwrapper.LaunchClassLoader;
|
|
+
|
|
import org.apache.logging.log4j.Level;
|
|
+
|
|
import com.google.common.base.Strings;
|
|
import com.google.common.base.Throwables;
|
|
import com.google.common.collect.ImmutableList;
|
|
@@ -38,6 +42,7 @@
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.ObjectArrays;
|
|
import com.google.common.primitives.Ints;
|
|
+
|
|
import cpw.mods.fml.common.FMLLog;
|
|
import cpw.mods.fml.common.asm.transformers.ModAccessTransformer;
|
|
import cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker;
|
|
@@ -94,6 +99,11 @@
|
|
@Override
|
|
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
|
{
|
|
+ // Cauldron start
|
|
+ // Register own ClassTransformer for some needs
|
|
+ classLoader.registerTransformer("kcauldron.KCauldronClassTransformer");
|
|
+ KCauldronClassTransformer.DEV = deobfuscatedEnvironment;
|
|
+ // Cauldron end
|
|
FMLRelaunchLog.fine("Injecting coremod %s {%s} class transformers", name, coreModInstance.getClass().getName());
|
|
if (coreModInstance.getASMTransformerClass() != null) for (String transformer : coreModInstance.getASMTransformerClass())
|
|
{
|
|
@@ -153,6 +163,9 @@
|
|
|
|
}
|
|
|
|
+ // Cauldron - group output of @MCVersion warnings
|
|
+ private static List<String> noVersionAnnotationCoreMods = new ArrayList<String>();
|
|
+
|
|
public static void handleLaunch(File mcDir, LaunchClassLoader classLoader, FMLTweaker tweaker)
|
|
{
|
|
CoreModManager.mcDir = mcDir;
|
|
@@ -212,6 +225,19 @@
|
|
loadCoreMod(classLoader, coreModClassName, null);
|
|
}
|
|
discoverCoreMods(mcDir, classLoader);
|
|
+ // Cauldron start - group output of @MCVersion warnings
|
|
+ if (!noVersionAnnotationCoreMods.isEmpty())
|
|
+ {
|
|
+ FMLRelaunchLog
|
|
+ .warning("The following coremods do not have a @MCVersion annotation. They may cause problems if this is not the correct version of Minecraft for them.");
|
|
+ StringBuilder sb = new StringBuilder("Missing @MCVersion: ");
|
|
+ for (String className : noVersionAnnotationCoreMods)
|
|
+ {
|
|
+ sb.append(className).append(" ");
|
|
+ }
|
|
+ FMLRelaunchLog.warning(sb.toString());
|
|
+ }
|
|
+ // Cauldron end
|
|
|
|
}
|
|
|
|
@@ -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())))
|
|
{
|
|
- FMLRelaunchLog.log(Level.WARN, "The coremod %s does not have a MCVersion annotation, it may cause issues with this version of Minecraft",
|
|
- coreModClass);
|
|
+ // Cauldron start - group output of @MCVersion warnings
|
|
+ // FMLRelaunchLog.log(Level.WARN, "The coremod %s does not have a MCVersion annotation, it may cause issues with this version of Minecraft",
|
|
+ // coreModClass);
|
|
+ noVersionAnnotationCoreMods.add(coreModClass);
|
|
+ // Cauldron end
|
|
}
|
|
else if (requiredMCVersion != null && !FMLInjectionData.mccversion.equals(requiredMCVersion.value()))
|
|
{
|