use of net.minecraftforge.common.config.ConfigElement 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;
}
use of net.minecraftforge.common.config.ConfigElement in project VoodooCraft by Mod-DevCafeTeam.
the class VoodooConfig method getEntries.
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;
}
use of net.minecraftforge.common.config.ConfigElement in project Charset by CharsetMC.
the class ConfigGui method getConfigElements.
private static List<IConfigElement> getConfigElements() {
Configuration config = ModCharset.configModules;
List<IConfigElement> list = Lists.newArrayList(new ConfigElement(config.getCategory("general").get("profile")), new DummyConfigElement.DummyCategoryElement("categories", "config.charset.categories.name", getSubConfigElements(config, "categories", ConfigElement::new)), new DummyConfigElement.DummyCategoryElement("overrides", "config.charset.overrides.name", getSubConfigElements(config, "overrides", ConfigElement::new)));
List<String> modulesWithConfigs = Lists.newArrayList(ModuleLoader.moduleConfigs.keySet());
Collections.sort(modulesWithConfigs);
for (String s : modulesWithConfigs) {
List<IConfigElement> clist = null;
String clsName = ModuleLoader.moduleGuiClasses.get(s);
if (clsName != null && clsName.length() > 0) {
try {
clist = ((ICharsetModuleConfigGui) Class.forName(clsName).newInstance()).createConfigElements();
} catch (Exception e) {
e.printStackTrace();
}
}
if (clist == null) {
clist = generateList(ModuleLoader.moduleConfigs.get(s));
}
list.add(new DummyConfigElement.DummyCategoryElement(s, "config.charset." + s + ".name", clist));
}
return list;
}
use of net.minecraftforge.common.config.ConfigElement in project TUMAT by canitzp.
the class GuiConf method getConfigElements.
private static List<IConfigElement> getConfigElements() {
List<IConfigElement> list = new ArrayList<>();
for (int i = 0; i < ConfigCats.values().length; i++) {
ConfigCats cat = ConfigCats.values()[i];
ConfigHandler.config.setCategoryComment(cat.name, cat.desc);
list.add(new ConfigElement(ConfigHandler.config.getCategory(cat.name)));
}
return list;
}
use of net.minecraftforge.common.config.ConfigElement in project Waddles by GirafiStudios.
the class GuiFactory method getConfigElements.
private static List<IConfigElement> getConfigElements() {
List<IConfigElement> list = new ArrayList<>();
List<IConfigElement> general = new ConfigElement(ConfigurationHandler.config.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements();
List<IConfigElement> spawnChances = new ConfigElement(ConfigurationHandler.config.getCategory(ConfigurationHandler.CATEGORY_PENGUIN_SPAWNS)).getChildElements();
list.add(new DummyConfigElement.DummyCategoryElement("General", new ResourceLocation(Reference.MOD_ID, "config.category.general").toString(), general));
list.add(new DummyConfigElement.DummyCategoryElement("Spawn Chances", new ResourceLocation(Reference.MOD_ID, "config.category.spawnchances").toString(), spawnChances));
return list;
}
Aggregations