mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 21:20:12 +00:00
Some test harness stuffs. Time to get the registry manager properly tested.
This commit is contained in:
1 parent
5f234fdcf8
commit
22394f87d5
7 files changed
+362
-4
No files matched your search
@@ -204,7 +204,7 @@ public class Loader
|
||||
}
|
||||
|
||||
modClassLoader = new ModClassLoader(getClass().getClassLoader());
|
||||
if (!mccversion.equals(MC_VERSION))
|
||||
if (mccversion !=null && !mccversion.equals(MC_VERSION))
|
||||
{
|
||||
FMLLog.severe("This version of FML is built for Minecraft %s, we have detected Minecraft %s in your minecraft jar file", mccversion, MC_VERSION);
|
||||
throw new LoaderException(String.format("This version of FML is built for Minecraft %s, we have detected Minecraft %s in your minecraft jar file", mccversion, MC_VERSION));
|
||||
@@ -1023,7 +1023,10 @@ public class Loader
|
||||
|
||||
public void fireRemapEvent(Map<ResourceLocation, Integer[]> remapBlocks, Map<ResourceLocation, Integer[]> remapItems, boolean isFreezing)
|
||||
{
|
||||
modController.propogateStateMessage(new FMLModIdMappingEvent(remapBlocks, remapItems, isFreezing));
|
||||
if (modController!=null)
|
||||
{
|
||||
modController.propogateStateMessage(new FMLModIdMappingEvent(remapBlocks, remapItems, isFreezing));
|
||||
}
|
||||
}
|
||||
|
||||
public void runtimeDisableMod(String modId)
|
||||
|
||||
@@ -55,7 +55,10 @@ public class ModClassLoader extends URLClassLoader
|
||||
|
||||
public ModClassLoader(ClassLoader parent) {
|
||||
super(new URL[0], null);
|
||||
this.mainClassLoader = (LaunchClassLoader)parent;
|
||||
if (parent instanceof LaunchClassLoader)
|
||||
{
|
||||
this.mainClassLoader = (LaunchClassLoader)parent;
|
||||
}
|
||||
this.sources = Lists.newArrayList();
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ import com.google.common.collect.Sets.SetView;
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public class PersistentRegistryManager
|
||||
{
|
||||
private enum PersistentRegistry
|
||||
enum PersistentRegistry
|
||||
{
|
||||
ACTIVE, VANILLA, FROZEN, STAGING;
|
||||
|
||||
|
||||
Reference in new issue
Block a user