From 0d5affede336f1a55218cfa53b1b27b525a891c8 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 17 Aug 2012 16:10:06 -0400 Subject: [PATCH] GIANT FAT WARNINGS if you use any code in net.minecraft.src or any subpackage thereof. Get it out of there, now! --- common/cpw/mods/fml/common/ModContainerFactory.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/cpw/mods/fml/common/ModContainerFactory.java b/common/cpw/mods/fml/common/ModContainerFactory.java index dcbb31b193..e0e8f5fd29 100644 --- a/common/cpw/mods/fml/common/ModContainerFactory.java +++ b/common/cpw/mods/fml/common/ModContainerFactory.java @@ -25,6 +25,14 @@ public class ModContainerFactory return new ModLoaderModContainer(className, modSource, modParser.getBaseModProperties()); } + // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh* + if (className.startsWith("net.minecraft.src.")) + { + FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. " + + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into " + + "a new package. Go on. DO IT NOW!",className); + } + for (ModAnnotation ann : modParser.getAnnotations()) { if (ann.getASMType().equals(Type.getType(Mod.class)))