Java 类net.minecraftforge.common.config.ConfigElement 实例源码

项目:McHeliPrivacyShield    文件:ConfigGuiFactory.java   
@SuppressWarnings({ "rawtypes" })
private static @Nonnull List<IConfigElement> getConfigElements() {
    final List<IConfigElement> list = new ArrayList<IConfigElement>();

    for (final String cat : Config.getConfig().getCategoryNames()) {
        final ConfigCategory cc = Config.getConfig().getCategory(cat);

        if (cc.isChild())
            continue;

        final ConfigElement ce = new ConfigElement<String>(cc);
        list.add(ce);
    }

    return list;
}
项目:AuthlibLoginHelper    文件:AuthlibLoginHelperGuiFactory.java   
private static List<IConfigElement> getConfigElements()
{
    PROPERTIES.clear();
    ImmutableList.Builder<IConfigElement> builder = ImmutableList.builder();
    Map<String, AuthlibLoginHelper.Data> accounts = AuthlibLoginHelper.getInstance().listAccounts();
    for (Map.Entry<String, AuthlibLoginHelper.Data> entry : accounts.entrySet())
    {
        String name = entry.getKey();
        AuthlibLoginHelper.Data data = entry.getValue();
        boolean skip = data.userid.isEmpty() && !data.accessToken.isPresent();

        String[] choices = skip ? SKIP_CHOICES.toArray(new String[0]) : LOGIN_CHOICES.toArray(new String[0]);
        Property property = new Property(name, choices[0], Property.Type.STRING, choices);
        property.setComment(skip ? SKIP_COMMENT : LOGIN_COMMENT);

        builder.add(new ConfigElement(property));
        PROPERTIES.put(name, property);
    }
    return builder.build();
}
项目:CustomWorldGen    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyCategoryElement("forgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingModConfig",
            ModOverridesEntry.class));
    list.addAll((new ConfigElement(ForgeChunkManager.getDefaultsCategory())).getChildElements());

    // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
    // GuiConfig object's propertyList will also be refreshed to reflect the changes.
    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID, "chunkLoader",
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
            GuiConfig.getAbridgedConfigPath(ForgeChunkManager.getConfig().toString()),
            I18n.format("forge.configgui.ctgy.forgeChunkLoadingConfig"));
}
项目:CustomWorldGen    文件:ForgeGuiFactory.java   
/**
 * This method is called in the constructor and is used to set the childScreen field.
 */
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyCategoryElement("addForgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingAddModConfig",
            AddModOverrideEntry.class));
    for (ConfigCategory cc : ForgeChunkManager.getModCategories())
        list.add(new ConfigElement(cc));

    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title,
            I18n.format("forge.configgui.ctgy.forgeChunkLoadingModConfig"));
}
项目:ThaumOres    文件:TOGuiConfig.java   
/** Create configuration element list */
private static List<IConfigElement> getElements() {
    ArrayList<IConfigElement> list = new ArrayList<IConfigElement>();

    List<IConfigElement> listGeneral = new ConfigElement(
            ThaumOresMod.config.getInstance().getCategory(TOConfig.categoryGeneral)).getChildElements();
    List<IConfigElement> listDebug = new ConfigElement(
            ThaumOresMod.config.getInstance().getCategory(TOConfig.categoryDebug)).getChildElements();
    List<IConfigElement> listGeneration = new ConfigElement(
            ThaumOresMod.config.getInstance().getCategory(TOConfig.categoryGeneration)).getChildElements();

    list.add(new DummyCategoryElement(TOConfig.categoryGeneral, TOConfig.categoryGeneral, listGeneral));
    list.add(new DummyCategoryElement(TOConfig.categoryDebug, TOConfig.categoryDebug, listDebug));
    list.add(new DummyCategoryElement(TOConfig.categoryGeneration, TOConfig.categoryGeneration, listGeneration));
    return list;
}
项目:CrystalMod    文件:GuiConfigFactoryCM.java   
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
  List<IConfigElement> list = new ArrayList<IConfigElement>();
  String[] names = new String[]{
        Config.CATEGORY_CLIENT,
        Config.CATEGORY_WORLD,
        Config.CATEGORY_ENTITY,
        Config.CATEGORY_ITEM,
        Config.CATEGORY_BLOCKS,
        Config.CATEGORY_MACHINE,
        Config.CATEGORY_MINIONS
  };
  for (String section : names) {
    list.add(new ConfigElement(CrystalMod.proxy.mainConfig.getCategory(section).setLanguageKey(Lang.prefix+"config." + section.toLowerCase())));
  }

  return list;
}
项目:TRHS_Club_Mod_2016    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyCategoryElement("forgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingModConfig", 
            ModOverridesEntry.class));
    list.addAll((new ConfigElement(ForgeChunkManager.getDefaultsCategory())).getChildElements());

    // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
    // GuiConfig object's propertyList will also be refreshed to reflect the changes.
    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID, "chunkLoader", 
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart, 
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
            GuiConfig.getAbridgedConfigPath(ForgeChunkManager.getConfig().toString()),
            I18n.func_135052_a("forge.configgui.ctgy.forgeChunkLoadingConfig"));
}
项目:TRHS_Club_Mod_2016    文件:ForgeGuiFactory.java   
/**
 * This method is called in the constructor and is used to set the childScreen field.
 */
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyCategoryElement("addForgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingAddModConfig", 
            AddModOverrideEntry.class));
    for (ConfigCategory cc : ForgeChunkManager.getModCategories())
        list.add(new ConfigElement(cc));

    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title, 
            I18n.func_135052_a("forge.configgui.ctgy.forgeChunkLoadingModConfig"));
}
项目:SignPicture    文件:ConfigGui.java   
@SuppressWarnings("rawtypes")
private static @Nonnull List<IConfigElement> getConfigElements() {
    final List<IConfigElement> list = new ArrayList<IConfigElement>();

    for (final String cat : Config.getConfig().getCategoryNames()) {
        final ConfigCategory cc = Config.getConfig().getCategory(cat);

        if (cc.isChild())
            continue;

        final ConfigElement ce = new ConfigElement<String>(cc);
        list.add(ce);
    }

    return list;
}
项目:blockbuster    文件:GuiConfig.java   
private static List<IConfigElement> getConfigElements()
{
    List<IConfigElement> elements = new ArrayList<IConfigElement>();

    for (String name : Blockbuster.proxy.forge.getCategoryNames())
    {
        ConfigCategory category = Blockbuster.proxy.forge.getCategory(name);
        category.setLanguageKey("blockbuster.config." + name + ".title");

        if (name.indexOf(".") == -1)
        {
            elements.add(new ConfigElement(category));
        }
    }

    return elements;
}
项目:UncraftingTable    文件:ModGuiConfig.java   
@Override
protected GuiScreen buildChildScreen()
{
    Configuration configuration = ModConfiguration.getConfig();
    ConfigElement configurationCategory = new ConfigElement(configuration.getCategory(ModConfiguration.CATEGORY_NUGGETS));
    List<IConfigElement> propertiesOnThisScreen = configurationCategory.getChildElements();
    String windowTitle = I18n.format("uncrafting.options.nuggets");

    return new GuiConfig(this.owningScreen, propertiesOnThisScreen,
        this.owningScreen.modID,
        ModConfiguration.CATEGORY_NUGGETS,
        this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
        this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
        windowTitle
    );

}
项目:JustEnoughButtons    文件:GuiJEBConfig.java   
public static List<IConfigElement> getElements() {
    buttonorder.clear();
    for (int i = 0; i < JEIButtons.btnCustom.length; i++) {
        buttonorder.add("enableCustomButton." + i);
        buttonorder.add("customName." + i);
        buttonorder.add("customCommand." + i);
    }

    List<IConfigElement> entries = new ArrayList<IConfigElement>();

    for (String name : ConfigHandler.config.getCategoryNames())
        if (name.equals(ConfigHandler.CATEGORY_CUSTOM))
            entries.add(new ConfigElement(ConfigHandler.config.getCategory(name).setPropertyOrder(buttonorder)));
        else
            entries.add(new ConfigElement(ConfigHandler.config.getCategory(name)));


    return entries;
}
项目:EEWReciever    文件:ConfigGui.java   
@SuppressWarnings("rawtypes")
private static List<IConfigElement> getConfigElements() {
    final List<IConfigElement> list = new ArrayList<IConfigElement>();

    for (final String cat : ConfigHandler.instance.getCategoryNames()) {
        final ConfigCategory cc = ConfigHandler.instance.getCategory(cat);

        if (cc.isChild())
            continue;

        final ConfigElement ce = new ConfigElement<String>(cc);
        list.add(ce);
    }

    return list;
}
项目:CauldronGit    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyCategoryElement("forgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingModConfig", 
            ModOverridesEntry.class));
    list.addAll((new ConfigElement(ForgeChunkManager.getDefaultsCategory())).getChildElements());

    // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
    // GuiConfig object's propertyList will also be refreshed to reflect the changes.
    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID, "chunkLoader", 
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart, 
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
            GuiConfig.getAbridgedConfigPath(ForgeChunkManager.getConfig().toString()),
            I18n.format("forge.configgui.ctgy.forgeChunkLoadingConfig"));
}
项目:CauldronGit    文件:ForgeGuiFactory.java   
/**
 * This method is called in the constructor and is used to set the childScreen field.
 */
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyCategoryElement("addForgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingAddModConfig", 
            AddModOverrideEntry.class));
    for (ConfigCategory cc : ForgeChunkManager.getModCategories())
        list.add(new ConfigElement(cc));

    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title, 
            I18n.format("forge.configgui.ctgy.forgeChunkLoadingModConfig"));
}
项目:nei-lotr    文件:DefaultConfigGui.java   
private static List<IConfigElement> getConfigElements() {
    List<IConfigElement> ret = new ArrayList();
    Configuration config = NeiLotr.mod.getConfig().getConfigFile();
    for (String category : config.getCategoryNames()) {
        ret.addAll(new ConfigElement(config.getCategory(category)).getChildElements());
    }
    return ret;
}
项目:Geolosys    文件:ConfigGUI.java   
private static List<IConfigElement> getConfigElements()
{
    ArrayList<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new ConfigElement(Config.getInstance().FeatureControl));
    list.add(new ConfigElement(Config.getInstance().Samples));
    list.add(new ConfigElement(Config.getInstance().UserEntries));

    return list;
}
项目:DankNull    文件:GuiModConfig.java   
private static List<IConfigElement> getConfigElements() {
    List<IConfigElement> configElements = new ArrayList<IConfigElement>();
    Configuration config = ModConfig.CONFIG;
    if (config != null) {
        ConfigCategory categoryClient = config.getCategory(ModConfig.CLIENT_CAT);
        configElements.addAll(new ConfigElement(categoryClient).getChildElements());
    }
    return configElements;
}
项目:VanillaExtras    文件:VExGuiFactory.java   
@Override
protected GuiScreen buildChildScreen() {
    Configuration config = VExConfig.getConfig();
    ConfigElement categoryBlocks = new ConfigElement(config.getCategory(VExConfig.CATEGORY_NAME_BLOCKS));
    List<IConfigElement> propertiesOnScreen = categoryBlocks.getChildElements();
    String windowTitle = I18n.format("gui.config.category.blocks");
    return new GuiConfig(owningScreen, propertiesOnScreen, owningScreen.modID,
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, windowTitle);
}
项目:connor41-etfuturum2    文件:ConfigGUI.java   
@SuppressWarnings({ "rawtypes" })
private static List<IConfigElement> getElements() {
    List<IConfigElement> list = new ArrayList<IConfigElement>();
    for (String category : ConfigurationHandler.INSTANCE.usedCategories)
        list.add(new ConfigElement(ConfigurationHandler.INSTANCE.configFile.getCategory(category)));
    return list;
}
项目:refinedstorageaddons    文件:RSAddonsConfig.java   
@SuppressWarnings("unchecked")
public List<IConfigElement> getConfigElements() {
    List<IConfigElement> list = new ArrayList<>();

    list.addAll(new ConfigElement(config.getCategory(NETWORK_PICKER)).getChildElements());
    list.addAll(new ConfigElement(config.getCategory(NETWORK_BAG)).getChildElements());
    list.addAll(new ConfigElement(config.getCategory(INFINITE_WIRELESS_TRANSMITTER)).getChildElements());
    list.addAll(new ConfigElement(config.getCategory(WIRELESS_CRAFTING_GRID)).getChildElements());

    return list;
}
项目:EndermanEvolution    文件:GuiModConfig.java   
private static List<IConfigElement> getConfigElements() {
    List<IConfigElement> configElements = new ArrayList<IConfigElement>();
    Configuration config = ModConfig.CONFIG;
    if (config != null) {
        ConfigCategory categoryClient = config.getCategory(ModConfig.CLIENT_CAT);
        configElements.addAll(new ConfigElement(categoryClient).getChildElements());
    }
    return configElements;
}
项目:ItemZoom    文件:ItemZoomModConfigGui.java   
private static List<IConfigElement> getConfigElements() {
    List<IConfigElement> configElements = new ArrayList<IConfigElement>();

    Configuration config = Config.getConfig();
    if (config != null) {
        ConfigCategory category = config.getCategory(Config.getCategory());
        configElements.addAll(new ConfigElement(category).getChildElements());
    }

    return configElements;
}
项目:TheOink    文件:OinkConfig.java   
public static List<IConfigElement> getEntries() {
    List<IConfigElement> entries = new ArrayList<IConfigElement>();
    Set<String> categories = config.getCategoryNames();
    Iterator<String> i = categories.iterator();
    while (i.hasNext()) {
        String categoryName = i.next();
        ConfigCategory category = config.getCategory(categoryName);
        entries.addAll(new ConfigElement(category).getChildElements());
    }
    return entries;
}
项目:Mods    文件:TF2GuiConfig.java   
public static List<IConfigElement> getElements() {
    ArrayList<IConfigElement> configElements = new ArrayList<>();
    configElements.add(new ConfigElement(TF2weapons.conf.getCategory("modcompatibility")));
    configElements.add(new ConfigElement(TF2weapons.conf.getCategory("spawn rate")));
    configElements.add(new ConfigElement(TF2weapons.conf.getCategory("world gen")));
    configElements.add(new ConfigElement(TF2weapons.conf.getCategory("default building targets")));
    configElements.add(new ConfigElement(TF2weapons.conf.getCategory("sound volume")));
    configElements.addAll(new ConfigElement(TF2weapons.conf.getCategory("gameplay")).getChildElements());
    return configElements;


    /*List<IConfigElement> list = new ConfigElement(TF2weapons.conf.getCategory("gameplay")).getChildElements();
    list.addAll(new ConfigElement(TF2weapons.conf.getCategory("modcompatibility")).getChildElements());
    return list;*/
}
项目:youtube-chat-for-minecraft    文件:YouTubeConfigurationGui.java   
public YouTubeConfigurationGui(GuiScreen parentScreen) {
  super(
      parentScreen,
      new ConfigElement(
              YouTubeConfiguration.getInstance()
                  .getConfig()
                  .getCategory(Configuration.CATEGORY_GENERAL))
          .getChildElements(),
      YouTubeChat.MODID,
      false,
      false,
      "YouTube Chat");
}
项目:CustomWorldGen    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
    // GuiConfig object's entryList will also be refreshed to reflect the changes.
    return new GuiConfig(this.owningScreen,
            (new ConfigElement(ForgeModContainer.getConfig().getCategory(Configuration.CATEGORY_GENERAL))).getChildElements(),
            this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
            GuiConfig.getAbridgedConfigPath(ForgeModContainer.getConfig().toString()));
}
项目:CustomWorldGen    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
    // GuiConfig object's entryList will also be refreshed to reflect the changes.
    return new GuiConfig(this.owningScreen,
                         (new ConfigElement(ForgeModContainer.getConfig().getCategory(Configuration.CATEGORY_CLIENT))).getChildElements(),
                         this.owningScreen.modID, Configuration.CATEGORY_CLIENT, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
                         this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
                         GuiConfig.getAbridgedConfigPath(ForgeModContainer.getConfig().toString()));
}
项目:CustomWorldGen    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    ConfigCategory cfg = ForgeModContainer.getConfig().getCategory(VERSION_CHECK_CAT);
    Map<String, Property> values = new HashMap<String, Property>(cfg.getValues());
    values.remove("Global");

    Property global = ForgeModContainer.getConfig().get(VERSION_CHECK_CAT, "Global", true);

    List<Property> props = new ArrayList<Property>();

    for (ModContainer mod : ForgeVersion.gatherMods().keySet())
    {
        values.remove(mod.getModId());
        props.add(ForgeModContainer.getConfig().get(VERSION_CHECK_CAT, mod.getModId(), true)); //Get or make the value in the config
    }
    props.addAll(values.values()); // Add any left overs from the config
    Collections.sort(props, new Comparator<Property>()
    {
        @Override
        public int compare(Property o1, Property o2)
        {
            return o1.getName().compareTo(o2.getName());
        }
    });

    List<IConfigElement> list = new ArrayList<IConfigElement>();
    list.add(new ConfigElement(global));
    for (Property prop : props)
    {
        list.add(new ConfigElement(prop));
    }

    // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
    // GuiConfig object's propertyList will also be refreshed to reflect the changes.
    return new GuiConfig(this.owningScreen,
            list,
            this.owningScreen.modID, VERSION_CHECK_CAT, true, true,
            GuiConfig.getAbridgedConfigPath(ForgeModContainer.getConfig().toString()));
}
项目:CustomWorldGen    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyConfigElement("modID", "", ConfigGuiType.STRING, "forge.configgui.modID").setCustomListEntryClass(ModIDEntry.class));
    list.add(new ConfigElement(new Property("maximumTicketCount", "200", Property.Type.INTEGER, "forge.configgui.maximumTicketCount")));
    list.add(new ConfigElement(new Property("maximumChunksPerTicket", "25", Property.Type.INTEGER, "forge.configgui.maximumChunksPerTicket")));

    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title,
            I18n.format("forge.configgui.ctgy.forgeChunkLoadingAddModConfig"));
}
项目:MacroKey    文件:GuiConfigMod.java   
public GuiConfigMod(GuiScreen parent)
{
    super(parent,
            new ConfigElement(
                    MacroKey.instance.configuration.getCategory(Configuration.CATEGORY_GENERAL))
                    .getChildElements(),
            Reference.MOD_ID,
            false,
            false,
            "Config Options for MacroKey");
    titleLine2 = MacroKey.instance.configuration.getConfigFile().getAbsolutePath();
}
项目:mves    文件:GuiConfigFactory.java   
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
  List<IConfigElement> list = new ArrayList<IConfigElement>();
  String prefix = MvesMod.MODID + ".config.";

  for (Section section : Section.values()) {
    if (!section.sync || !CONFIGHANDLER.configLockedByServer) {
      list.add(new ConfigElement(CONFIGHANDLER.configuration.getCategory(section.name).setLanguageKey(prefix + section.name)));
    }
  }

  return list;
}
项目:Dailies    文件:GuiConfigDailies.java   
public GuiConfigDailies(GuiScreen parent) {
    super (parent, new ConfigElement(ConfigurationHandler.config.getCategory(Configuration.CATEGORY_CLIENT)).getChildElements(),
            DailiesMod.MODID,
            false,
            false,
            DailiesMod.metadata.name);
    titleLine2 = ConfigurationHandler.config.getConfigFile().getAbsolutePath();
}
项目:4Space-5    文件:ConfigManagerCore.java   
public static List<IConfigElement> getConfigElements()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();
    list.addAll(new ConfigElement(config.getCategory(Constants.CONFIG_CATEGORY_DIMENSIONS)).getChildElements());
    list.addAll(new ConfigElement(config.getCategory(Constants.CONFIG_CATEGORY_SCHEMATIC)).getChildElements());
    list.addAll(new ConfigElement(config.getCategory(Constants.CONFIG_CATEGORY_ACHIEVEMENTS)).getChildElements());
    list.addAll(new ConfigElement(config.getCategory(Constants.CONFIG_CATEGORY_ENTITIES)).getChildElements());
    list.addAll(new ConfigElement(config.getCategory(Constants.CONFIG_CATEGORY_GENERAL)).getChildElements());
    return list;
}
项目:muon    文件:MuonGuiConfig.java   
public MuonGuiConfig(GuiScreen parent)
{
    super(parent,
            new ConfigElement(MuonConfig.getConfig().getCategory(MuonConfig.CATEGORY_GENERATION)).getChildElements(),
            "muon",
            false,
            false,
            "Muon "+MuonConfig.config.getCategory(MuonConfig.CATEGORY_GENERATION).getName(),
            MuonConfig.config.getConfigFile().getName());
}
项目:TRHS_Club_Mod_2016    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
    // GuiConfig object's entryList will also be refreshed to reflect the changes.
    return new GuiConfig(this.owningScreen, 
            (new ConfigElement(ForgeModContainer.getConfig().getCategory(Configuration.CATEGORY_GENERAL))).getChildElements(), 
            this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart, 
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
            GuiConfig.getAbridgedConfigPath(ForgeModContainer.getConfig().toString()));
}
项目:TRHS_Club_Mod_2016    文件:ForgeGuiFactory.java   
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyConfigElement("modID", "", ConfigGuiType.STRING, "forge.configgui.modID").setCustomListEntryClass(ModIDEntry.class));
    list.add(new ConfigElement<Integer>(new Property("maximumTicketCount", "200", Property.Type.INTEGER, "forge.configgui.maximumTicketCount")));
    list.add(new ConfigElement<Integer>(new Property("maximumChunksPerTicket", "25", Property.Type.INTEGER, "forge.configgui.maximumChunksPerTicket")));

    return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
            this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
            this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title,
            I18n.func_135052_a("forge.configgui.ctgy.forgeChunkLoadingAddModConfig"));
}
项目:metamorph    文件:GuiConfig.java   
private static List<IConfigElement> getConfigElements()
{
    List<IConfigElement> elements = new ArrayList<IConfigElement>();

    for (String name : Metamorph.proxy.forge.getCategoryNames())
    {
        ConfigCategory category = Metamorph.proxy.forge.getCategory(name);

        category.setLanguageKey("metamorph.config." + name + ".title");
        elements.add(new ConfigElement(category));
    }

    return elements;
}
项目:TravelHut    文件:GuiConfigFactory.java   
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
  List<IConfigElement> list = new ArrayList<IConfigElement>();
  String prefix = TravelHutMod.MODID + ".config.";

  for (Section section : Section.values()) {
    if (!section.sync || !ConfigHandler.configLockedByServer) {
      list.add(new ConfigElement(ConfigHandler.configuration.getCategory(section.name).setLanguageKey(prefix + section.name)));
    }
  }

  return list;
}
项目:ItsJustaCharm1.10.2Dead    文件:ModConfigGui.java   
private static List<IConfigElement> getConfigCategories() {

        List<IConfigElement> categories = new ArrayList<IConfigElement>();

        for (String category : ModConfig.configuration.getCategoryNames()) {
            ConfigCategory cc = ModConfig.configuration.getCategory(category);
            if (cc.isChild()) continue;
            ConfigElement ce = new ConfigElement(cc);
            categories.add(ce);
        }
        return categories;
    }