Kill more references to modloader.
This commit is contained in:
parent
2867dfdfa5
commit
82004fe703
4 changed files with 2 additions and 58 deletions
|
@ -50,9 +50,7 @@ public class FMLDummyContainer extends DummyModContainer implements WorldAccessC
|
||||||
meta.authorList=Arrays.asList("cpw, LexManos");
|
meta.authorList=Arrays.asList("cpw, LexManos");
|
||||||
meta.description="The Forge Mod Loader provides the ability for systems to load mods " +
|
meta.description="The Forge Mod Loader provides the ability for systems to load mods " +
|
||||||
"from the file system. It also provides key capabilities for mods to be able " +
|
"from the file system. It also provides key capabilities for mods to be able " +
|
||||||
"to cooperate and provide a good modding environment. " +
|
"to cooperate and provide a good modding environment. ";
|
||||||
"The mod loading system is compatible with ModLoader, all your ModLoader " +
|
|
||||||
"mods should work.";
|
|
||||||
meta.url="https://github.com/MinecraftForge/FML/wiki";
|
meta.url="https://github.com/MinecraftForge/FML/wiki";
|
||||||
meta.updateUrl="https://github.com/MinecraftForge/FML/wiki";
|
meta.updateUrl="https://github.com/MinecraftForge/FML/wiki";
|
||||||
meta.screenshots=new String[0];
|
meta.screenshots=new String[0];
|
||||||
|
|
|
@ -278,20 +278,13 @@ public class Loader
|
||||||
/**
|
/**
|
||||||
* The primary loading code
|
* The primary loading code
|
||||||
*
|
*
|
||||||
* This is visited during first initialization by Minecraft to scan and load
|
|
||||||
* the mods from all sources 1. The minecraft jar itself (for loading of in
|
|
||||||
* jar mods- I would like to remove this if possible but forge depends on it
|
|
||||||
* at present) 2. The mods directory with expanded subdirs, searching for
|
|
||||||
* mods named mod_*.class 3. The mods directory for zip and jar files,
|
|
||||||
* searching for mod classes named mod_*.class again
|
|
||||||
*
|
*
|
||||||
* The found resources are first loaded into the {@link #modClassLoader}
|
* The found resources are first loaded into the {@link #modClassLoader}
|
||||||
* (always) then scanned for class resources matching the specification
|
* (always) then scanned for class resources matching the specification
|
||||||
* above.
|
* above.
|
||||||
*
|
*
|
||||||
* If they provide the {@link Mod} annotation, they will be loaded as
|
* If they provide the {@link Mod} annotation, they will be loaded as
|
||||||
* "FML mods", which currently is effectively a NO-OP. If they are
|
* "FML mods"
|
||||||
* determined to be {@link BaseModProxy} subclasses they are loaded as such.
|
|
||||||
*
|
*
|
||||||
* Finally, if they are successfully loaded as classes, they are then added
|
* Finally, if they are successfully loaded as classes, they are then added
|
||||||
* to the available mod list.
|
* to the available mod list.
|
||||||
|
|
|
@ -47,25 +47,6 @@ public class FMLSanityChecker implements IFMLCallHook
|
||||||
private static final String FMLFINGERPRINT = "51:0A:FB:4C:AF:A4:A0:F2:F5:CF:C5:0E:B4:CC:3C:30:24:4A:E3:8E".toLowerCase().replace(":", "");
|
private static final String FMLFINGERPRINT = "51:0A:FB:4C:AF:A4:A0:F2:F5:CF:C5:0E:B4:CC:3C:30:24:4A:E3:8E".toLowerCase().replace(":", "");
|
||||||
private static final String FORGEFINGERPRINT = "E3:C3:D5:0C:7C:98:6D:F7:4C:64:5C:0A:C5:46:39:74:1C:90:A5:57".toLowerCase().replace(":", "");
|
private static final String FORGEFINGERPRINT = "E3:C3:D5:0C:7C:98:6D:F7:4C:64:5C:0A:C5:46:39:74:1C:90:A5:57".toLowerCase().replace(":", "");
|
||||||
private static final String MCFINGERPRINT = "CD:99:95:96:56:F7:53:DC:28:D8:63:B4:67:69:F7:F8:FB:AE:FC:FC".toLowerCase().replace(":", "");
|
private static final String MCFINGERPRINT = "CD:99:95:96:56:F7:53:DC:28:D8:63:B4:67:69:F7:F8:FB:AE:FC:FC".toLowerCase().replace(":", "");
|
||||||
static class MLDetectorClassVisitor extends ClassVisitor
|
|
||||||
{
|
|
||||||
private boolean foundMarker = false;
|
|
||||||
private MLDetectorClassVisitor()
|
|
||||||
{
|
|
||||||
super(Opcodes.ASM4);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FieldVisitor visitField(int arg0, String arg1, String arg2, String arg3, Object arg4)
|
|
||||||
{
|
|
||||||
if ("fmlMarker".equals(arg1))
|
|
||||||
{
|
|
||||||
foundMarker = true;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private LaunchClassLoader cl;
|
private LaunchClassLoader cl;
|
||||||
public static File fmlLocation;
|
public static File fmlLocation;
|
||||||
|
|
||||||
|
@ -192,28 +173,6 @@ public class FMLSanityChecker implements IFMLCallHook
|
||||||
{
|
{
|
||||||
FMLRelaunchLog.severe("FML appears to be missing any signature data. This is not a good thing");
|
FMLRelaunchLog.severe("FML appears to be missing any signature data. This is not a good thing");
|
||||||
}
|
}
|
||||||
byte[] mlClass = cl.getClassBytes("ModLoader");
|
|
||||||
// Only care in obfuscated env
|
|
||||||
if (mlClass == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
MLDetectorClassVisitor mlTester = new MLDetectorClassVisitor();
|
|
||||||
ClassReader cr = new ClassReader(mlClass);
|
|
||||||
cr.accept(mlTester, ClassReader.SKIP_CODE);
|
|
||||||
if (!mlTester.foundMarker)
|
|
||||||
{
|
|
||||||
JOptionPane.showMessageDialog(null, "<html>CRITICAL ERROR<br/>" +
|
|
||||||
"ModLoader was detected in this environment<br/>" +
|
|
||||||
"ForgeModLoader cannot be installed alongside ModLoader<br/>" +
|
|
||||||
"All mods should work without ModLoader being installed<br/>" +
|
|
||||||
"Because ForgeModLoader is 100% compatible with ModLoader<br/>" +
|
|
||||||
"Re-install Minecraft Forge or Forge ModLoader into a clean<br/>" +
|
|
||||||
"jar and try again.",
|
|
||||||
"ForgeModLoader critical error",
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
throw new RuntimeException("Invalid ModLoader class detected");
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,12 +108,6 @@ public class FMLDeobfuscatingRemapper extends Remapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
classNameBiMap = builder.build();
|
classNameBiMap = builder.build();
|
||||||
// Special case some mappings for modloader mods
|
|
||||||
mcpBuilder.put("BaseMod","net/minecraft/src/BaseMod");
|
|
||||||
mcpBuilder.put("ModLoader","net/minecraft/src/ModLoader");
|
|
||||||
mcpBuilder.put("EntityRendererProxy","net/minecraft/src/EntityRendererProxy");
|
|
||||||
mcpBuilder.put("MLProp","net/minecraft/src/MLProp");
|
|
||||||
mcpBuilder.put("TradeEntry","net/minecraft/src/TradeEntry");
|
|
||||||
mcpNameBiMap = mcpBuilder.build();
|
mcpNameBiMap = mcpBuilder.build();
|
||||||
}
|
}
|
||||||
catch (IOException ioe)
|
catch (IOException ioe)
|
||||||
|
|
Loading…
Reference in a new issue