Java 类cpw.mods.fml.common.FMLModContainer 实例源码

项目:RefinedRelocation    文件:LoginSyncHandler.java   
public static String[] getModIDs()
{
    List<ModContainer> modList = Loader.instance().getActiveModList();
    List<String> modIDs = new ArrayList<String>();
    for (ModContainer modContainer : modList)
    {
        if (modContainer instanceof FMLModContainer)
        {
            modIDs.add(modContainer.getModId());
        }
    }
    Collections.sort(modIDs, new Comparator<String>()
    {
        @Override
        public int compare(String o1, String o2)
        {
            return Loader.instance().getIndexedModList().get(o1).getName().compareTo(Loader.instance().getIndexedModList().get(o2).getName());
        }
    });
    return modIDs.toArray(new String[modIDs.size()]);
}
项目:TRHS_Club_Mod_2016    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}
项目:BetterLoadingScreen_1.7    文件:BetterLoadingScreen.java   
@EventHandler
public void construct(FMLConstructionEvent event) {
    ModLoadingListener thisListener = null;
    for (ModContainer mod : Loader.instance().getActiveModList()) {
        if (mod instanceof FMLModContainer) {
            EventBus bus = null;
            try {
                // Its a bit questionable to be changing FML itself, but reflection is better than ASM transforming
                // forge
                Field f = FMLModContainer.class.getDeclaredField("eventBus");
                f.setAccessible(true);
                bus = (EventBus) f.get(mod);
            }
            catch (Throwable t) {
                t.printStackTrace();
            }
            if (bus != null) {
                if (mod.getModId().equals(Lib.Mod.ID)) {
                    thisListener = new ModLoadingListener(mod);
                    bus.register(thisListener);
                }
                else
                    bus.register(new ModLoadingListener(mod));
            }
        }
    }
    if (thisListener != null)
        ModLoadingListener.doProgress(State.CONSTRUCT, thisListener);
}
项目:CauldronGit    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}
项目:NEI-Integration    文件:LoadedModDumper.java   
@Override
public Iterable<String[]> dump(int mode) {
    List<String[]> list = new LinkedList<String[]>();

    for (ModContainer mod : Loader.instance().getModList()) {
        list.add(new String[] { mod.getModId(), mod.getName(), mod.getVersion(), String.valueOf(!(mod instanceof FMLModContainer)), String.valueOf(mod.canBeDisabled()), mod.getDependencies().toString() });
    }

    return list;
}
项目:Cauldron    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}
项目:Cauldron    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}
项目:Cauldron    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}
项目:RuneCraftery    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}
项目:RuneCraftery    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}
项目:BetterNutritionMod    文件:FMLPreInitializationEvent.java   
public Properties getVersionProperties()
{
    if (this.modContainer instanceof FMLModContainer)
    {
        return ((FMLModContainer)this.modContainer).searchForVersionProperties();
    }

    return null;
}