use of net.minecraftforge.common.config.ConfigElement 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;
}
use of net.minecraftforge.common.config.ConfigElement 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;
}
}
use of net.minecraftforge.common.config.ConfigElement in project DynamicSurroundings by OreCruncher.
the class DynSurroundConfigGui method addConfigElement.
private void addConfigElement(@Nonnull final String category, @Nonnull final String prop) {
final Property property = this.config.getCategory(category).get(prop);
this.configElements.add(new ConfigElement(property));
}
use of net.minecraftforge.common.config.ConfigElement in project ForestryMC by ForestryMC.
the class ForestryGuiConfig method getConfigCategories.
private static List<IConfigElement> getConfigCategories() {
List<IConfigElement> configElements = new ArrayList<>();
LocalizedConfiguration configCommon = Config.configCommon;
if (configCommon != null) {
List<String> commonCategoryNames = Arrays.asList("crafting", "difficulty", "genetics", "performance", "structures", "tweaks", "world");
for (String categoryName : commonCategoryNames) {
ConfigCategory category = configCommon.getCategory(categoryName);
configElements.add(new ConfigElement(category));
}
}
LocalizedConfiguration configFluid = Config.configFluid;
if (configFluid != null) {
List<String> fluidCategoryNames = Arrays.asList("enableFluid", "enableFluidBlock");
for (String categoryName : fluidCategoryNames) {
ConfigCategory category = configFluid.getCategory(categoryName);
configElements.add(new ConfigElement(category));
}
}
return configElements;
}
Aggregations