use of net.minecraftforge.fml.client.config.IConfigElement in project EnderIO by SleepyTrousers.
the class GuiConfigFactoryEIO method getConfigElements.
/*
* Note: We are using the Forge config structure to build our GUI. This makes our ConfigElementEio a bit hacky, so it would be better to keep our own tree in
* ValueFactory.
*/
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
List<IConfigElement> result = new ArrayList<>();
List<ModContainer> modList = Loader.instance().getModList();
for (ModContainer modContainer : modList) {
Object mod = modContainer.getMod();
if (mod instanceof IEnderIOAddon) {
Configuration configuration = ((IEnderIOAddon) mod).getConfiguration();
if (configuration != null) {
List<IConfigElement> list = new ArrayList<>();
for (String section : configuration.getCategoryNames()) {
final ConfigCategory category = configuration.getCategory(section);
category.setLanguageKey(EnderIO.lang.addPrefix("config." + category.getQualifiedName()));
if (!category.isChild()) {
list.add(new ConfigElementEio(category));
}
}
result.add(new DummyCategoryElement(modContainer.getName(), EnderIO.lang.addPrefix("config.title." + modContainer.getModId()), list));
}
}
}
return result;
}
use of net.minecraftforge.fml.client.config.IConfigElement 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;
}
use of net.minecraftforge.fml.client.config.IConfigElement in project Cavern2 by kegare.
the class CavernConfigEntry method getConfigElements.
@Override
protected List<IConfigElement> getConfigElements() {
List<IConfigElement> ret = super.getConfigElements();
ret.add(new DummyCategoryElement("cavern:cavernBiomes", Config.LANG_KEY + "biomes", CavernBiomesEntry.class));
ret.add(new DummyCategoryElement("cavern:cavernVeins", Config.LANG_KEY + "veins", CavernVeinsEntry.class));
return ret;
}
use of net.minecraftforge.fml.client.config.IConfigElement in project Cavern2 by kegare.
the class DimensionConfigEntry method getConfigElements.
@Override
protected List<IConfigElement> getConfigElements() {
List<IConfigElement> list = Lists.newArrayList();
list.add(new DummyCategoryElement("cavern:cavernConfig", Config.LANG_KEY + "dimension.cavern", CavernConfigEntry.class));
list.add(new DummyCategoryElement("cavern:hugeCavernConfig", Config.LANG_KEY + "dimension.hugeCavern", HugeCavernConfigEntry.class));
list.add(new DummyCategoryElement("cavern:aquaCavernConfig", Config.LANG_KEY + "dimension.aquaCavern", AquaCavernConfigEntry.class));
list.add(new DummyCategoryElement("cavern:mirageWorldsConfig", Config.LANG_KEY + "dimension.mirageWorlds", MirageWorldsConfigEntry.class));
return list;
}
use of net.minecraftforge.fml.client.config.IConfigElement in project Cavern2 by kegare.
the class HugeCavernConfigEntry method getConfigElements.
@Override
protected List<IConfigElement> getConfigElements() {
List<IConfigElement> ret = super.getConfigElements();
ret.add(new DummyCategoryElement("cavern:hugeCavernBiomes", Config.LANG_KEY + "biomes", HugeCavernBiomesEntry.class));
ret.add(new DummyCategoryElement("cavern:hugeCavernVeins", Config.LANG_KEY + "veins", HugeCavernVeinsEntry.class));
return ret;
}
Aggregations