java类cpw.mods.fml.common.event.FMLLoadEvent的实例源码

LoadController.java 文件源码 项目:TRHS_Club_Mod_2016 阅读 24 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARN, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
}
LoadController.java 文件源码 项目:CauldronGit 阅读 26 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARN, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
}
LoadController.java 文件源码 项目:Cauldron 阅读 28 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARN, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
}
LoadController.java 文件源码 项目:Cauldron 阅读 20 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARN, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
}
LoadController.java 文件源码 项目:Cauldron 阅读 30 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARN, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
}
LoadController.java 文件源码 项目:RuneCraftery 阅读 25 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    this.modList = loader.getIndexedModList();
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        FMLRelaunchLog.makeLog(mod.getModId());
        Logger modLogger = Logger.getLogger(mod.getModId());
        Logger eventLog = Logger.getLogger(EventBus.class.getName() + "." + mod.getModId());
        eventLog.setParent(modLogger);

        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            Level level = Logger.getLogger(mod.getModId()).getLevel();
            FMLLog.log(mod.getModId(), Level.FINE, "Mod Logging channel %s configured at %s level.", mod.getModId(), level == null ? "default" : level);
            FMLLog.log(mod.getModId(), Level.INFO, "Activating mod %s", mod.getModId());
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARNING, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
    FMLCommonHandler.instance().updateResourcePackList();
}
LoadController.java 文件源码 项目:RuneCraftery 阅读 28 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    this.modList = loader.getIndexedModList();
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        FMLRelaunchLog.makeLog(mod.getModId());
        Logger modLogger = Logger.getLogger(mod.getModId());
        Logger eventLog = Logger.getLogger(EventBus.class.getName() + "." + mod.getModId());
        eventLog.setParent(modLogger);

        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            Level level = Logger.getLogger(mod.getModId()).getLevel();
            FMLLog.log(mod.getModId(), Level.FINE, "Mod Logging channel %s configured at %s level.", mod.getModId(), level == null ? "default" : level);
            FMLLog.log(mod.getModId(), Level.INFO, "Activating mod %s", mod.getModId());
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARNING, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
    FMLCommonHandler.instance().updateResourcePackList();
}
LoadController.java 文件源码 项目:BetterNutritionMod 阅读 21 收藏 0 点赞 0 评论 0
@Subscribe
public void buildModList(FMLLoadEvent event)
{
    this.modList = loader.getIndexedModList();
    Builder<String, EventBus> eventBus = ImmutableMap.builder();

    for (ModContainer mod : loader.getModList())
    {
        //Create mod logger, and make the EventBus logger a child of it.
        FMLRelaunchLog.makeLog(mod.getModId());
        Logger modLogger = Logger.getLogger(mod.getModId());
        Logger eventLog = Logger.getLogger(EventBus.class.getName() + "." + mod.getModId());
        eventLog.setParent(modLogger);

        EventBus bus = new EventBus(mod.getModId());
        boolean isActive = mod.registerBus(bus, this);
        if (isActive)
        {
            Level level = Logger.getLogger(mod.getModId()).getLevel();
            FMLLog.log(mod.getModId(), Level.FINE, "Mod Logging channel %s configured at %s level.", mod.getModId(), level == null ? "default" : level);
            FMLLog.log(mod.getModId(), Level.INFO, "Activating mod %s", mod.getModId());
            activeModList.add(mod);
            modStates.put(mod.getModId(), ModState.UNLOADED);
            eventBus.put(mod.getModId(), bus);
            FMLCommonHandler.instance().addModToResourcePack(mod);
        }
        else
        {
            FMLLog.log(mod.getModId(), Level.WARNING, "Mod %s has been disabled through configuration", mod.getModId());
            modStates.put(mod.getModId(), ModState.UNLOADED);
            modStates.put(mod.getModId(), ModState.DISABLED);
        }
    }

    eventChannels = eventBus.build();
    FMLCommonHandler.instance().updateResourcePackList();
}
Loader.java 文件源码 项目:CauldronGit 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Called from the hook to start mod loading. We trigger the
 * {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
 * the mod list is frozen completely and is consider immutable from then on.
 */
public void loadMods()
{
    initializeLoader();
    mods = Lists.newArrayList();
    namedMods = Maps.newHashMap();
    modController = new LoadController(this);
    modController.transition(LoaderState.LOADING, false);
    discoverer = identifyMods();
    ModAPIManager.INSTANCE.manageAPI(modClassLoader, discoverer);
    disableRequestedMods();
    modController.distributeStateMessage(FMLLoadEvent.class);
    sortModList();
    ModAPIManager.INSTANCE.cleanupAPIContainers(modController.getActiveModList());
    ModAPIManager.INSTANCE.cleanupAPIContainers(mods);
    mods = ImmutableList.copyOf(mods);
    for (File nonMod : discoverer.getNonModLibs())
    {
        if (nonMod.isFile())
        {
            FMLLog.info("FML has found a non-mod file %s in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName());
            try
            {
                modClassLoader.addFile(nonMod);
            }
            catch (MalformedURLException e)
            {
                FMLLog.log(Level.ERROR, e, "Encountered a weird problem with non-mod file injection : %s", nonMod.getName());
            }
        }
    }
    modController.transition(LoaderState.CONSTRUCTING, false);
    modController.distributeStateMessage(LoaderState.CONSTRUCTING, modClassLoader, discoverer.getASMTable(), reverseDependencies);
    FMLLog.fine("Mod signature data");
    for (ModContainer mod : getActiveModList())
    {
        FMLLog.fine("\t%s(%s:%s): %s (%s)", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), CertificateHelper.getFingerprint(mod.getSigningCertificate()));
    }
    if (getActiveModList().isEmpty())
    {
        FMLLog.fine("No user mod signature data found");
    }
    modController.transition(LoaderState.PREINITIALIZATION, false);
}
Fallacia.java 文件源码 项目:Fallacia 阅读 13 收藏 0 点赞 0 评论 0
public void load(FMLLoadEvent event)
{
    ModBiomes.load();
}
Loader.java 文件源码 项目:Cauldron 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Called from the hook to start mod loading. We trigger the
 * {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
 * the mod list is frozen completely and is consider immutable from then on.
 */
public void loadMods()
{
    initializeLoader();
    mods = Lists.newArrayList();
    namedMods = Maps.newHashMap();
    modController = new LoadController(this);
    modController.transition(LoaderState.LOADING, false);
    discoverer = identifyMods();
    ModAPIManager.INSTANCE.manageAPI(modClassLoader, discoverer);
    disableRequestedMods();
    modController.distributeStateMessage(FMLLoadEvent.class);
    sortModList();
    ModAPIManager.INSTANCE.cleanupAPIContainers(modController.getActiveModList());
    ModAPIManager.INSTANCE.cleanupAPIContainers(mods);
    mods = ImmutableList.copyOf(mods);
    for (File nonMod : discoverer.getNonModLibs())
    {
        if (nonMod.isFile())
        {
            FMLLog.info("FML has found a non-mod file %s in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName());
            try
            {
                modClassLoader.addFile(nonMod);
            }
            catch (MalformedURLException e)
            {
                FMLLog.log(Level.ERROR, e, "Encountered a weird problem with non-mod file injection : %s", nonMod.getName());
            }
        }
    }
    modController.transition(LoaderState.CONSTRUCTING, false);
    modController.distributeStateMessage(LoaderState.CONSTRUCTING, modClassLoader, discoverer.getASMTable(), reverseDependencies);
    FMLLog.fine("Mod signature data");
    for (ModContainer mod : getActiveModList())
    {
        FMLLog.fine("\t%s(%s:%s): %s (%s)", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), CertificateHelper.getFingerprint(mod.getSigningCertificate()));
    }
    if (getActiveModList().isEmpty())
    {
        FMLLog.fine("No user mod signature data found");
    }
    modController.transition(LoaderState.PREINITIALIZATION, false);
}
Loader.java 文件源码 项目:Cauldron 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Called from the hook to start mod loading. We trigger the
 * {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
 * the mod list is frozen completely and is consider immutable from then on.
 */
public void loadMods()
{
    initializeLoader();
    mods = Lists.newArrayList();
    namedMods = Maps.newHashMap();
    modController = new LoadController(this);
    modController.transition(LoaderState.LOADING, false);
    discoverer = identifyMods();
    ModAPIManager.INSTANCE.manageAPI(modClassLoader, discoverer);
    disableRequestedMods();
    modController.distributeStateMessage(FMLLoadEvent.class);
    sortModList();
    ModAPIManager.INSTANCE.cleanupAPIContainers(modController.getActiveModList());
    ModAPIManager.INSTANCE.cleanupAPIContainers(mods);
    mods = ImmutableList.copyOf(mods);
    for (File nonMod : discoverer.getNonModLibs())
    {
        if (nonMod.isFile())
        {
            FMLLog.info("FML has found a non-mod file %s in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName());
            try
            {
                modClassLoader.addFile(nonMod);
            }
            catch (MalformedURLException e)
            {
                FMLLog.log(Level.ERROR, e, "Encountered a weird problem with non-mod file injection : %s", nonMod.getName());
            }
        }
    }
    modController.transition(LoaderState.CONSTRUCTING, false);
    modController.distributeStateMessage(LoaderState.CONSTRUCTING, modClassLoader, discoverer.getASMTable(), reverseDependencies);
    FMLLog.fine("Mod signature data");
    for (ModContainer mod : getActiveModList())
    {
        FMLLog.fine("\t%s(%s:%s): %s (%s)", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), CertificateHelper.getFingerprint(mod.getSigningCertificate()));
    }
    if (getActiveModList().isEmpty())
    {
        FMLLog.fine("No user mod signature data found");
    }
    modController.transition(LoaderState.PREINITIALIZATION, false);
}
Loader.java 文件源码 项目:Cauldron 阅读 24 收藏 0 点赞 0 评论 0
/**
 * Called from the hook to start mod loading. We trigger the
 * {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
 * the mod list is frozen completely and is consider immutable from then on.
 */
public void loadMods()
{
    initializeLoader();
    mods = Lists.newArrayList();
    namedMods = Maps.newHashMap();
    modController = new LoadController(this);
    modController.transition(LoaderState.LOADING, false);
    discoverer = identifyMods();
    ModAPIManager.INSTANCE.manageAPI(modClassLoader, discoverer);
    disableRequestedMods();
    modController.distributeStateMessage(FMLLoadEvent.class);
    sortModList();
    ModAPIManager.INSTANCE.cleanupAPIContainers(modController.getActiveModList());
    ModAPIManager.INSTANCE.cleanupAPIContainers(mods);
    mods = ImmutableList.copyOf(mods);
    for (File nonMod : discoverer.getNonModLibs())
    {
        if (nonMod.isFile())
        {
            FMLLog.info("FML has found a non-mod file %s in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName());
            try
            {
                modClassLoader.addFile(nonMod);
            }
            catch (MalformedURLException e)
            {
                FMLLog.log(Level.ERROR, e, "Encountered a weird problem with non-mod file injection : %s", nonMod.getName());
            }
        }
    }
    modController.transition(LoaderState.CONSTRUCTING, false);
    modController.distributeStateMessage(LoaderState.CONSTRUCTING, modClassLoader, discoverer.getASMTable(), reverseDependencies);
    FMLLog.fine("Mod signature data");
    for (ModContainer mod : getActiveModList())
    {
        FMLLog.fine("\t%s(%s:%s): %s (%s)", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), CertificateHelper.getFingerprint(mod.getSigningCertificate()));
    }
    if (getActiveModList().isEmpty())
    {
        FMLLog.fine("No user mod signature data found");
    }
    modController.transition(LoaderState.PREINITIALIZATION, false);
}
Loader.java 文件源码 项目:RuneCraftery 阅读 24 收藏 0 点赞 0 评论 0
/**
 * Called from the hook to start mod loading. We trigger the
 * {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
 * the mod list is frozen completely and is consider immutable from then on.
 */
public void loadMods()
{
    initializeLoader();
    mods = Lists.newArrayList();
    namedMods = Maps.newHashMap();
    modController = new LoadController(this);
    modController.transition(LoaderState.LOADING, false);
    ModDiscoverer disc = identifyMods();
    ModAPIManager.INSTANCE.manageAPI(modClassLoader, disc);
    disableRequestedMods();
    FMLLog.fine("Reloading logging properties from %s", loggingProperties.getPath());
    FMLRelaunchLog.loadLogConfiguration(loggingProperties);
    FMLLog.fine("Reloaded logging properties");
    modController.distributeStateMessage(FMLLoadEvent.class);
    sortModList();
    ModAPIManager.INSTANCE.cleanupAPIContainers(modController.getActiveModList());
    ModAPIManager.INSTANCE.cleanupAPIContainers(mods);
    mods = ImmutableList.copyOf(mods);
    for (File nonMod : disc.getNonModLibs())
    {
        if (nonMod.isFile())
        {
            FMLLog.info("FML has found a non-mod file %s in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName());
            try
            {
                modClassLoader.addFile(nonMod);
            }
            catch (MalformedURLException e)
            {
                FMLLog.log(Level.SEVERE, e, "Encountered a weird problem with non-mod file injection : %s", nonMod.getName());
            }
        }
    }
    modController.transition(LoaderState.CONSTRUCTING, false);
    modController.distributeStateMessage(LoaderState.CONSTRUCTING, modClassLoader, disc.getASMTable());
    FMLLog.fine("Mod signature data");
    for (ModContainer mod : getActiveModList())
    {
        FMLLog.fine("\t%s(%s:%s): %s (%s)", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), CertificateHelper.getFingerprint(mod.getSigningCertificate()));
    }
    if (getActiveModList().isEmpty())
    {
        FMLLog.fine("No user mod signature data found");
    }
    modController.transition(LoaderState.PREINITIALIZATION, false);
    modController.distributeStateMessage(LoaderState.PREINITIALIZATION, disc.getASMTable(), canonicalConfigDir);
    modController.transition(LoaderState.INITIALIZATION, false);
    GameData.validateRegistry();
}
Loader.java 文件源码 项目:RuneCraftery 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Called from the hook to start mod loading. We trigger the
 * {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
 * the mod list is frozen completely and is consider immutable from then on.
 */
public void loadMods()
{
    initializeLoader();
    mods = Lists.newArrayList();
    namedMods = Maps.newHashMap();
    modController = new LoadController(this);
    modController.transition(LoaderState.LOADING, false);
    ModDiscoverer disc = identifyMods();
    ModAPIManager.INSTANCE.manageAPI(modClassLoader, disc);
    disableRequestedMods();
    FMLLog.fine("Reloading logging properties from %s", loggingProperties.getPath());
    FMLRelaunchLog.loadLogConfiguration(loggingProperties);
    FMLLog.fine("Reloaded logging properties");
    modController.distributeStateMessage(FMLLoadEvent.class);
    sortModList();
    ModAPIManager.INSTANCE.cleanupAPIContainers(modController.getActiveModList());
    ModAPIManager.INSTANCE.cleanupAPIContainers(mods);
    mods = ImmutableList.copyOf(mods);
    for (File nonMod : disc.getNonModLibs())
    {
        if (nonMod.isFile())
        {
            FMLLog.info("FML has found a non-mod file %s in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName());
            try
            {
                modClassLoader.addFile(nonMod);
            }
            catch (MalformedURLException e)
            {
                FMLLog.log(Level.SEVERE, e, "Encountered a weird problem with non-mod file injection : %s", nonMod.getName());
            }
        }
    }
    modController.transition(LoaderState.CONSTRUCTING, false);
    modController.distributeStateMessage(LoaderState.CONSTRUCTING, modClassLoader, disc.getASMTable());
    FMLLog.fine("Mod signature data");
    for (ModContainer mod : getActiveModList())
    {
        FMLLog.fine("\t%s(%s:%s): %s (%s)", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), CertificateHelper.getFingerprint(mod.getSigningCertificate()));
    }
    if (getActiveModList().isEmpty())
    {
        FMLLog.fine("No user mod signature data found");
    }
    modController.transition(LoaderState.PREINITIALIZATION, false);
    modController.distributeStateMessage(LoaderState.PREINITIALIZATION, disc.getASMTable(), canonicalConfigDir);
    modController.transition(LoaderState.INITIALIZATION, false);
    GameData.validateRegistry();
}
Loader.java 文件源码 项目:BetterNutritionMod 阅读 25 收藏 0 点赞 0 评论 0
/**
 * Called from the hook to start mod loading. We trigger the
 * {@link #identifyMods()} and Constructing, Preinitalization, and Initalization phases here. Finally,
 * the mod list is frozen completely and is consider immutable from then on.
 */
public void loadMods()
{
    initializeLoader();
    mods = Lists.newArrayList();
    namedMods = Maps.newHashMap();
    modController = new LoadController(this);
    modController.transition(LoaderState.LOADING, false);
    ModDiscoverer disc = identifyMods();
    ModAPIManager.INSTANCE.manageAPI(modClassLoader, disc);
    disableRequestedMods();
    FMLLog.fine("Reloading logging properties from %s", loggingProperties.getPath());
    FMLRelaunchLog.loadLogConfiguration(loggingProperties);
    FMLLog.fine("Reloaded logging properties");
    modController.distributeStateMessage(FMLLoadEvent.class);
    sortModList();
    ModAPIManager.INSTANCE.cleanupAPIContainers(modController.getActiveModList());
    ModAPIManager.INSTANCE.cleanupAPIContainers(mods);
    mods = ImmutableList.copyOf(mods);
    for (File nonMod : disc.getNonModLibs())
    {
        if (nonMod.isFile())
        {
            FMLLog.info("FML has found a non-mod file %s in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.", nonMod.getName());
            try
            {
                modClassLoader.addFile(nonMod);
            }
            catch (MalformedURLException e)
            {
                FMLLog.log(Level.SEVERE, e, "Encountered a weird problem with non-mod file injection : %s", nonMod.getName());
            }
        }
    }
    modController.transition(LoaderState.CONSTRUCTING, false);
    modController.distributeStateMessage(LoaderState.CONSTRUCTING, modClassLoader, disc.getASMTable());
    FMLLog.fine("Mod signature data");
    for (ModContainer mod : getActiveModList())
    {
        FMLLog.fine("\t%s(%s:%s): %s (%s)", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), CertificateHelper.getFingerprint(mod.getSigningCertificate()));
    }
    if (getActiveModList().isEmpty())
    {
        FMLLog.fine("No user mod signature data found");
    }
    modController.transition(LoaderState.PREINITIALIZATION, false);
    modController.distributeStateMessage(LoaderState.PREINITIALIZATION, disc.getASMTable(), canonicalConfigDir);
    modController.transition(LoaderState.INITIALIZATION, false);
    GameData.validateRegistry();
}


问题


面经


文章

微信
公众号

扫码关注公众号