Search in sources :

Example 11 with IConfigElement

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

the class CavelandConfigEntry method getConfigElements.

@Override
protected List<IConfigElement> getConfigElements() {
    List<IConfigElement> ret = super.getConfigElements();
    ret.add(new DummyCategoryElement("cavern:cavelandVeins", Config.LANG_KEY + "veins", CavelandVeinsEntry.class));
    return ret;
}
Also used : IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) DummyCategoryElement(net.minecraftforge.fml.client.config.DummyConfigElement.DummyCategoryElement)

Example 12 with IConfigElement

use of net.minecraftforge.fml.client.config.IConfigElement in project MC-Prefab by Brian-Wuest.

the class GuiPrefab method ReplaceIntegerEntries.

private void ReplaceIntegerEntries() {
    for (int i = 0; i < this.entryList.listEntries.size(); i++) {
        IConfigEntry entry = this.entryList.listEntries.get(i);
        IConfigElement element = entry.getConfigElement();
        if (element.getType() == ConfigGuiType.INTEGER) {
            TextNumberSliderEntry slider = new TextNumberSliderEntry(this, this.entryList, element);
            slider.updateValueButtonText();
            this.entryList.listEntries.set(i, slider);
            this.initEntries.set(i, slider);
        }
    }
}
Also used : IConfigEntry(net.minecraftforge.fml.client.config.GuiConfigEntries.IConfigEntry) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement)

Example 13 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 14 with IConfigElement

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

the class GuiBOPFactory method getConfigElements.

private static List<IConfigElement> getConfigElements() {
    List<IConfigElement> list = new ArrayList<IConfigElement>();
    List<IConfigElement> convenience_settings = new ConfigElement(GameplayConfigurationHandler.config.getCategory(CONVENIENCE_SETTINGS.toLowerCase())).getChildElements();
    List<IConfigElement> gui_settings = new ConfigElement(config.getCategory(GUI_SETTINGS.toLowerCase())).getChildElements();
    List<IConfigElement> texture_settings = new ConfigElement(config.getCategory(VISUAL_SETTINGS.toLowerCase())).getChildElements();
    List<IConfigElement> trail_settings = new ConfigElement(config.getCategory(TRAIL_SETTINGS.toLowerCase())).getChildElements();
    list.add(new DummyCategoryElement(I18n.translateToLocal("config.category.convenienceSettings.title"), "config.category.convenienceSettings", convenience_settings));
    list.add(new DummyCategoryElement(I18n.translateToLocal("config.category.guiSettings.title"), "config.category.guiSettings", gui_settings));
    list.add(new DummyCategoryElement(I18n.translateToLocal("config.category.textureSettings.title"), "config.category.textureSettings", texture_settings));
    if (TrailManager.trailsMap.containsKey(PlayerUtil.getClientPlayerUUID())) {
        list.add(new DummyCategoryElement(I18n.translateToLocal("config.category.trailSettings.title"), "config.category.trailSettings", trail_settings));
    }
    return list;
}
Also used : IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) ConfigElement(net.minecraftforge.common.config.ConfigElement) ArrayList(java.util.ArrayList) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) DummyCategoryElement(net.minecraftforge.fml.client.config.DummyConfigElement.DummyCategoryElement)

Example 15 with IConfigElement

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

the class ConfigGUI method getConfigElements.

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;
}
Also used : ConfigElement(net.minecraftforge.common.config.ConfigElement) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) ArrayList(java.util.ArrayList) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement)

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