Search in sources :

Example 1 with AgriConfigCategory

use of com.agricraft.agricore.config.AgriConfigCategory in project AgriCraft by AgriCraft.

the class AgriCraftGuiConfig method getConfigElements.

private static List<IConfigElement> getConfigElements() {
    List<IConfigElement> configElements = new ArrayList<>();
    for (AgriConfigCategory e : AgriConfigCategory.values()) {
        String descr = "AgriCraft " + e.getDisplayName() + " Settings";
        String name = "agricraft.configgui.ctgy." + e.name();
        configElements.add(new DummyConfigElement.DummyCategoryElement(descr, name, new ConfigElement(CoreHandler.getConfig().getCategory(e.name().toLowerCase())).getChildElements()));
    }
    return configElements;
}
Also used : IConfigElement(net.minecraftforge.fml.client.config.IConfigElement) ConfigElement(net.minecraftforge.common.config.ConfigElement) DummyConfigElement(net.minecraftforge.fml.client.config.DummyConfigElement) AgriConfigCategory(com.agricraft.agricore.config.AgriConfigCategory) ArrayList(java.util.ArrayList) DummyConfigElement(net.minecraftforge.fml.client.config.DummyConfigElement) IConfigElement(net.minecraftforge.fml.client.config.IConfigElement)

Aggregations

AgriConfigCategory (com.agricraft.agricore.config.AgriConfigCategory)1 ArrayList (java.util.ArrayList)1 ConfigElement (net.minecraftforge.common.config.ConfigElement)1 DummyConfigElement (net.minecraftforge.fml.client.config.DummyConfigElement)1 IConfigElement (net.minecraftforge.fml.client.config.IConfigElement)1