Search in sources :

Example 16 with IConfigElement

use of net.minecraftforge.fml.client.config.IConfigElement in project MorePlanets by SteveKunG.

the class ConfigManagerMP method getConfigElements.

public static List<IConfigElement> getConfigElements() {
    List<IConfigElement> list = new ArrayList<>();
    ConfigCategory configGeneral = ConfigManagerMP.config.getCategory(ConfigManagerMP.GENERAL);
    configGeneral.setComment(GCCoreUtil.translate("gui.config.mp.general"));
    list.add(new ConfigElement(configGeneral));
    ConfigCategory configDimension = ConfigManagerMP.config.getCategory(ConfigManagerMP.DIMENSIONS);
    configDimension.setComment(GCCoreUtil.translate("gui.config.mp.dimension"));
    list.add(new ConfigElement(configDimension));
    ConfigCategory configGCAddon = ConfigManagerMP.config.getCategory(ConfigManagerMP.GC_ADDON_COMPAT);
    configGCAddon.setComment(GCCoreUtil.translate("gui.config.mp.gcaddon"));
    list.add(new ConfigElement(configGCAddon));
    ConfigCategory configGUIs = ConfigManagerMP.config.getCategory(ConfigManagerMP.OTHERS);
    configGUIs.setComment(GCCoreUtil.translate("gui.config.mp.other"));
    list.add(new ConfigElement(configGUIs));
    return list;
}
Also used : ConfigCategory(net.minecraftforge.common.config.ConfigCategory) ConfigElement(net.minecraftforge.common.config.ConfigElement) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) ArrayList(java.util.ArrayList) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement)

Example 17 with IConfigElement

use of net.minecraftforge.fml.client.config.IConfigElement in project Charset by CharsetMC.

the class ConfigGui method generateList.

public static List<IConfigElement> generateList(Configuration config) {
    List<IConfigElement> list = new ArrayList<>();
    for (String name : config.getCategoryNames()) {
        ConfigCategory category = config.getCategory(name);
        list.add(new DummyConfigElement.DummyCategoryElement(category.getName(), category.getLanguagekey(), generateList(category)));
    }
    return list;
}
Also used : ConfigCategory(net.minecraftforge.common.config.ConfigCategory) ArrayList(java.util.ArrayList) DummyConfigElement(net.minecraftforge.fml.client.config.DummyConfigElement) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement)

Example 18 with IConfigElement

use of net.minecraftforge.fml.client.config.IConfigElement in project BiomeTweaker by superckl.

the class GuiScreenConfig method getConfigElements.

private static List<IConfigElement> getConfigElements() {
    final List<IConfigElement> list = new ArrayList<>();
    DummyConfigElement dummy = new DummyConfigElement("Reload Scripts", false, ConfigGuiType.BOOLEAN, "biometweaker.cfg.reload");
    dummy.setConfigEntryClass(ReloadScriptsConfigEntry.class);
    list.add(dummy);
    dummy = new DummyConfigElement("Regenerate Output Files", false, ConfigGuiType.BOOLEAN, "biometweaker.cfg.output");
    dummy.setConfigEntryClass(RegenerateOutputConfigEntry.class);
    list.add(dummy);
    dummy = new DummyConfigElement("Biome Layout Image", false, ConfigGuiType.BOOLEAN, "biometweaker.cfg.layout");
    dummy.setConfigEntryClass(BiomeLayoutConfigEntry.class);
    list.add(dummy);
    return list;
}
Also used : ArrayList(java.util.ArrayList) DummyConfigElement(net.minecraftforge.fml.client.config.DummyConfigElement) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement)

Example 19 with IConfigElement

use of net.minecraftforge.fml.client.config.IConfigElement in project BuildCraft by BuildCraft.

the class BCConfigElement method getChildElements.

@Override
public List<IConfigElement> getChildElements() {
    if (!isProp) {
        List<IConfigElement> elements = new ArrayList<>();
        Iterator<ConfigCategory> ccI = cat.getChildren().iterator();
        Iterator<Property> pI = cat.getOrderedValues().iterator();
        while (ccI.hasNext()) {
            ConfigCategory child = ccI.next();
            if (!child.parent.getQualifiedName().equals(cat.getQualifiedName())) {
                continue;
            }
            ConfigElement temp = new BCConfigElement(child);
            if (temp.showInGui()) {
                elements.add(temp);
            }
        }
        while (pI.hasNext()) {
            ConfigElement temp = new ConfigElement(pI.next());
            if (temp.showInGui()) {
                elements.add(temp);
            }
        }
        return elements;
    } else {
        return null;
    }
}
Also used : ConfigCategory(net.minecraftforge.common.config.ConfigCategory) ConfigElement(net.minecraftforge.common.config.ConfigElement) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) ArrayList(java.util.ArrayList) Property(net.minecraftforge.common.config.Property) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement)

Example 20 with IConfigElement

use of net.minecraftforge.fml.client.config.IConfigElement in project Cavern2 by kegare.

the class MirageWorldsConfigEntry method getConfigElements.

@Override
protected List<IConfigElement> getConfigElements() {
    List<IConfigElement> list = Lists.newArrayList();
    list.add(new DummyCategoryElement("cavern:cavelandConfig", Config.LANG_KEY + "dimension.caveland", CavelandConfigEntry.class));
    list.add(new DummyCategoryElement("cavern:caveniaConfig", Config.LANG_KEY + "dimension.cavenia", CaveniaConfigEntry.class));
    list.addAll(super.getConfigElements());
    return list;
}
Also used : IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) DummyCategoryElement(net.minecraftforge.fml.client.config.DummyConfigElement.DummyCategoryElement)

Aggregations

IConfigElement (net.minecraftforge.fml.client.config.IConfigElement)24 ArrayList (java.util.ArrayList)14 ConfigElement (net.minecraftforge.common.config.ConfigElement)11 DummyCategoryElement (net.minecraftforge.fml.client.config.DummyConfigElement.DummyCategoryElement)10 ConfigCategory (net.minecraftforge.common.config.ConfigCategory)7 DummyConfigElement (net.minecraftforge.fml.client.config.DummyConfigElement)5 Configuration (net.minecraftforge.common.config.Configuration)2 Property (net.minecraftforge.common.config.Property)2 DisplayConfigEntry (cavern.client.config.common.DisplayConfigEntry)1 GeneralConfigEntry (cavern.client.config.common.GeneralConfigEntry)1 MiningAssistConfigEntry (cavern.client.config.common.MiningAssistConfigEntry)1 DimensionConfigEntry (cavern.client.config.dimension.DimensionConfigEntry)1 AgriConfigCategory (com.agricraft.agricore.config.AgriConfigCategory)1 IEnderIOAddon (crazypants.enderio.api.addon.IEnderIOAddon)1 ConfigCats (de.canitzp.tumat.configuration.cats.ConfigCats)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 IConfigEntry (net.minecraftforge.fml.client.config.GuiConfigEntries.IConfigEntry)1 ModContainer (net.minecraftforge.fml.common.ModContainer)1